summary refs log tree commit diff
path: root/pkgs/tools/misc/lorri
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-07-29 00:12:37 +0200
committerProfpatsch <mail@profpatsch.de>2020-07-29 01:13:12 +0200
commit5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693 (patch)
tree24103570fde37af12419dd50e91b90ec66fcd342 /pkgs/tools/misc/lorri
parent220e4134173e753a4e536c29483480eb42a28327 (diff)
downloadnixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.tar
nixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.tar.gz
nixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.tar.bz2
nixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.tar.lz
nixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.tar.xz
nixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.tar.zst
nixpkgs-5ae739c10e61e2b5c0a3506ce9b7accd1d0d8693.zip
lorri: 1.1 -> 1.1.1
Patch release which adds a manpage.

Adding a `man` and a `doc` output, and copying the files to the
corresponding directories.

The `overrideAttrs` is necessary because `buildRustPackage` does not
allow adding outputs.
Diffstat (limited to 'pkgs/tools/misc/lorri')
-rw-r--r--pkgs/tools/misc/lorri/default.nix26
1 files changed, 20 insertions, 6 deletions
diff --git a/pkgs/tools/misc/lorri/default.nix b/pkgs/tools/misc/lorri/default.nix
index 002a6e2eaec..c0f5aec1e4d 100644
--- a/pkgs/tools/misc/lorri/default.nix
+++ b/pkgs/tools/misc/lorri/default.nix
@@ -12,9 +12,9 @@
 , Security
 }:
 
-rustPlatform.buildRustPackage rec {
+(rustPlatform.buildRustPackage rec {
   pname = "lorri";
-  version = "1.1";
+  version = "1.1.1";
 
   meta = with stdenv.lib; {
     description = "Your project's nix-env";
@@ -28,11 +28,11 @@ rustPlatform.buildRustPackage rec {
     repo = pname;
     # Run `eval $(nix-build -A lorri.updater)` after updating the revision!
     # ALSO don’t forget to update the cargoSha256!
-    rev = "93d93013217cd9aa09d2bd316d6c3abf827a6601";
-    sha256 = "0wbkx8hmikngfp6fp0y65yla22f3k0jszq8a6pas80q0b33llwm5";
+    rev = "05ea21170a18800e83b3dcf1e3d347f83a9fa992";
+    sha256 = "1lgig5q1anmmmc1i1qnbx8rd8mqvm5csgnlaxlj4l4rxjmgiv06n";
   };
 
-  cargoSha256 = "1a3n1ylyp63x6v7b07nnqpfxjzmsgwmgraza23lx8z4gh167gv46";
+  cargoSha256 = "16asbpq47f3zcv4j9rzqx9v1317qz7xjr7dxd019vpr88zyk4fi1";
   doCheck = false;
 
   BUILD_REV_COUNT = src.revCount or 1;
@@ -42,6 +42,17 @@ 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 = writers.writeBash "copy-runtime-nix.sh" ''
       set -euo pipefail
@@ -52,4 +63,7 @@ rustPlatform.buildRustPackage rec {
       nixos = nixosTests.lorri;
     };
   };
-}
+}).overrideAttrs (old: {
+  # add man and doc outputs to put our documentation into
+  outputs = old.outputs or [ "out" ] ++ [ "man" "doc" ];
+})