diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/lorri/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/lorri/default.nix | 38 |
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 7829a677b43..99ac31f6a0b 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; }; }; -} +}) |