git.iko.soy/typeable/nixpkgs
on master help sign in
imag: init at 0.10.1

Co-authored-by: Oleksii Filonenko <brightone@protonmail.com>

commitd5b0454f43931d4ee8d2c4df079428d2743f3046 authorMinijackson <minijackson@riseup.net> dateWed 27 May 2020, 14:14 (6 years ago) parentef5faff
2 files changed+67
pkgs/applications/misc/imag/default.nix+63 pkgs/top-level/all-packages.nix+4
pkgs/applications/misc/imag/default.nixnew file+63
@@ -0,0 +1,63 @@
1+{ stdenv
2+, rustPlatform
3+, fetchFromGitHub
4+, llvmPackages
5+, openssl
6+, pkg-config
7+, installShellFiles
8+, Security
9+, gitMinimal
10+, utillinuxMinimal
11+}:
12+
13+rustPlatform.buildRustPackage rec {
14+ pname = "imag";
15+ version = "0.10.1";
16+
17+ src = fetchFromGitHub {
18+ owner = "matthiasbeyer";
19+ repo = pname;
20+ rev = "v${version}";
21+ sha256 = "0f9915f083z5qqcxyavj0w6m973c8m1x7kfb89pah5agryy5mkaq";
22+ };
23+
24+ nativeBuildInputs = [ installShellFiles pkg-config ];
25+ buildInputs = [ openssl ]
26+ ++ stdenv.lib.optional stdenv.isDarwin Security;
27+ checkInputs = [ gitMinimal utillinuxMinimal ];
28+
29+ LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
30+
31+ cargoSha256 = "0n8cw70qh8g4hfwfaxwwxbrrx5hm2z037z8kdhvdpqkxljl9189x";
32+
33+ checkPhase = ''
34+ export HOME=$TMPDIR
35+ git config --global user.email "nobody@example.com"
36+ git config --global user.name "Nobody"
37+
38+ # UI tests uses executables directly, so we need to build them before
39+ # launching the tests
40+ cargo build
41+ '' + (
42+ # CLI uses the presence of a controlling TTY to check if arguments are
43+ # passed in stdin, or in the command-line, so we use script to create
44+ # a PTY for us.
45+ if !stdenv.isDarwin then ''
46+ script -qfec "cargo test --workspace"
47+ '' else ''
48+ script -q "cargo test --workspace"
49+ ''
50+ );
51+
52+ postInstall = ''
53+ installShellCompletion target/imag.{bash,fish} --zsh target/_imag
54+ '';
55+
56+ meta = with stdenv.lib; {
57+ description = "Commandline personal information management suite";
58+ homepage = "https://imag-pim.org/";
59+ license = licenses.lgpl21;
60+ maintainers = with maintainers; [ filalex77 minijackson ];
61+ platforms = platforms.unix;
62+ };
63+}
pkgs/top-level/all-packages.nix+4
@@ -20184,6 +20184,10 @@ in
2018420184
2018520185 iksemel = callPackage ../development/libraries/iksemel { };
2018620186
20187+ imag = callPackage ../applications/misc/imag {
20188+ inherit (darwin.apple_sdk.frameworks) Security;
20189+ };
20190+
2018720191 imagej = callPackage ../applications/graphics/imagej { };
2018820192
2018920193 imagemagick_light = imagemagick.override {