mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:48:10 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
61 lines
1.6 KiB
Nix
61 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
|
, glibcLocales, gobject-introspection, gtk3, libsoup, libsecret
|
|
, buildPythonPackage, python
|
|
, pygobject3, freezegun, mock
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gtimelog";
|
|
version = "unstable-2020-05-16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "80682ddbf9e0d68b8c67257289784f3b49b543d8";
|
|
sha256 = "0qv2kv7vc3qqlzxsisgg31cmrkkqgnmxspbj10c5fhdmwzzwi0i9";
|
|
};
|
|
|
|
buildInputs = [
|
|
makeWrapper
|
|
glibcLocales gobject-introspection gtk3 libsoup libsecret
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
pygobject3 freezegun mock
|
|
];
|
|
|
|
checkPhase = ''
|
|
substituteInPlace runtests --replace "/usr/bin/env python3" "${python.interpreter}"
|
|
./runtests
|
|
'';
|
|
|
|
pythonImportsCheck = [ "gtimelog" ];
|
|
|
|
preFixup = ''
|
|
wrapProgram $out/bin/gtimelog \
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
|
--prefix LD_LIBRARY_PATH ":" "${gtk3.out}/lib" \
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A time tracking app";
|
|
longDescription = ''
|
|
GTimeLog is a small time tracking application for GNOME.
|
|
It's main goal is to be as unintrusive as possible.
|
|
|
|
To run gtimelog successfully on a system that does not have full GNOME 3
|
|
installed, the following NixOS options should be set:
|
|
- programs.dconf.enable = true;
|
|
- services.gnome3.gnome-keyring.enable = true;
|
|
|
|
In addition, the following packages should be added to the environment:
|
|
- gnome3.adwaita-icon-theme
|
|
- gnome3.dconf
|
|
'';
|
|
homepage = "https://gtimelog.org/";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ oxzi ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|