about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/lorri
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-10 07:13:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-12 14:07:16 +0000
commite2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch)
tree79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/tools/misc/lorri
parent1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff)
parent84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff)
downloadnixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/lorri')
-rw-r--r--nixpkgs/pkgs/tools/misc/lorri/default.nix38
1 files changed, 28 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/tools/misc/lorri/default.nix b/nixpkgs/pkgs/tools/misc/lorri/default.nix
index 7829a677b431..99ac31f6a0b9 100644
--- a/nixpkgs/pkgs/tools/misc/lorri/default.nix
+++ b/nixpkgs/pkgs/tools/misc/lorri/default.nix
@@ -4,7 +4,7 @@
 , rustPlatform
   # Updater script
 , runtimeShell
-, writeScript
+, writers
   # Tests
 , nixosTests
   # Apple dependencies
@@ -12,9 +12,16 @@
 , Security
 }:
 
-rustPlatform.buildRustPackage rec {
+let
+  # Run `eval $(nix-build -A lorri.updater)` after updating the revision!
+  version = "1.2";
+  gitRev = "43a260c221d5dac4a44fd82271736c8444474eec";
+  sha256 = "0g6zq27dpr8bdan5xrqchybpbqwnhhc7x8sxbfygigbqd3xv9i6n";
+  cargoSha256 = "1zmlp14v7av0znmjyy2aq83lc74503p6r0l11l9iw7s3xad8rda4";
+
+in (rustPlatform.buildRustPackage rec {
   pname = "lorri";
-  version = "1.0";
+  inherit version;
 
   meta = with stdenv.lib; {
     description = "Your project's nix-env";
@@ -26,12 +33,13 @@ rustPlatform.buildRustPackage rec {
   src = fetchFromGitHub {
     owner = "target";
     repo = pname;
-    # Run `eval $(nix-build -A lorri.updater)` after updating the revision!
-    rev = "88c680c9abf0f04f2e294436d20073ccf26f0781";
-    sha256 = "1415mhdr0pwvshs04clfz1ys76r5qf9jz8jchm63l6llaj6m7mrv";
+    rev = gitRev;
+    inherit sha256;
   };
 
-  cargoSha256 = "1iwd0cad8dp8q5xz2mm7zn1wphr5brkw937dfygc88afj6bv3d68";
+  outputs = [ "out" "man" "doc" ];
+
+  inherit cargoSha256;
   doCheck = false;
 
   BUILD_REV_COUNT = src.revCount or 1;
@@ -41,9 +49,19 @@ rustPlatform.buildRustPackage rec {
   buildInputs =
     stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
 
+  # copy the docs to the $man and $doc outputs
+  postInstall = ''
+    install -Dm644 lorri.1 $man/share/man/man1/lorri.1
+    install -Dm644 -t $doc/share/doc/lorri/ \
+      README.md \
+      CONTRIBUTING.md \
+      LICENSE \
+      MAINTAINERS.md
+    cp -r contrib/ $doc/share/doc/lorri/contrib
+  '';
+
   passthru = {
-    updater = with builtins; writeScript "copy-runtime-nix.sh" ''
-      #!${runtimeShell}
+    updater = writers.writeBash "copy-runtime-nix.sh" ''
       set -euo pipefail
       cp ${src}/nix/runtime.nix ${toString ./runtime.nix}
       cp ${src}/nix/runtime-closure.nix.template ${toString ./runtime-closure.nix.template}
@@ -52,4 +70,4 @@ rustPlatform.buildRustPackage rec {
       nixos = nixosTests.lorri;
     };
   };
-}
+})