aboutsummaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2020-05-27 14:14:36 +0200
committerMinijackson <minijackson@riseup.net>2020-05-27 18:21:30 +0200
commitd5b0454f43931d4ee8d2c4df079428d2743f3046 (patch)
tree11f26ef2365c57e715d3aeb195e3e4b4bdd8e21e /pkgs
parentef5faff8c6960020a7fce841325091f114f945df (diff)
imag: init at 0.10.1
Co-authored-by: Oleksii Filonenko <brightone@protonmail.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/imag/default.nix63
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/applications/misc/imag/default.nix b/pkgs/applications/misc/imag/default.nix
new file mode 100644
index 000000000000..bb6956aaa596
--- /dev/null
+++ b/pkgs/applications/misc/imag/default.nix
@@ -0,0 +1,63 @@
+{ stdenv
+, rustPlatform
+, fetchFromGitHub
+, llvmPackages
+, openssl
+, pkg-config
+, installShellFiles
+, Security
+, gitMinimal
+, utillinuxMinimal
+}:
+
+rustPlatform.buildRustPackage rec {
+ pname = "imag";
+ version = "0.10.1";
+
+ src = fetchFromGitHub {
+ owner = "matthiasbeyer";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "0f9915f083z5qqcxyavj0w6m973c8m1x7kfb89pah5agryy5mkaq";
+ };
+
+ nativeBuildInputs = [ installShellFiles pkg-config ];
+ buildInputs = [ openssl ]
+ ++ stdenv.lib.optional stdenv.isDarwin Security;
+ checkInputs = [ gitMinimal utillinuxMinimal ];
+
+ LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
+
+ cargoSha256 = "0n8cw70qh8g4hfwfaxwwxbrrx5hm2z037z8kdhvdpqkxljl9189x";
+
+ checkPhase = ''
+ export HOME=$TMPDIR
+ git config --global user.email "nobody@example.com"
+ git config --global user.name "Nobody"
+
+ # UI tests uses executables directly, so we need to build them before
+ # launching the tests
+ cargo build
+ '' + (
+ # CLI uses the presence of a controlling TTY to check if arguments are
+ # passed in stdin, or in the command-line, so we use script to create
+ # a PTY for us.
+ if !stdenv.isDarwin then ''
+ script -qfec "cargo test --workspace"
+ '' else ''
+ script -q "cargo test --workspace"
+ ''
+ );
+
+ postInstall = ''
+ installShellCompletion target/imag.{bash,fish} --zsh target/_imag
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Commandline personal information management suite";
+ homepage = "https://imag-pim.org/";
+ license = licenses.lgpl21;
+ maintainers = with maintainers; [ filalex77 minijackson ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index bbac14b4852e..69384874509f 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -20184,6 +20184,10 @@ in
iksemel = callPackage ../development/libraries/iksemel { };
+ imag = callPackage ../applications/misc/imag {
+ inherit (darwin.apple_sdk.frameworks) Security;
+ };
+
imagej = callPackage ../applications/graphics/imagej { };
imagemagick_light = imagemagick.override {