diff options
Diffstat (limited to 'nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix')
-rw-r--r-- | nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix b/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix index 24a1465e690a..56bbe6bec51b 100644 --- a/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix +++ b/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix @@ -6,6 +6,8 @@ , version # : string , sha256 ? lib.fakeSha256 + # : drv | null +, manpages ? null # : string , description # : list Platform @@ -63,7 +65,15 @@ stdenv.mkDerivation { inherit sha256; }; - inherit outputs; + outputs = + if manpages == null + then outputs + else + assert (lib.assertMsg (!lib.elem "man" outputs) "If you pass `manpages` to `skawarePackages.buildPackage`, you cannot have a `man` output already!"); + # insert as early as posible, but keep the first element + if lib.length outputs > 0 + then [(lib.head outputs) "man"] ++ lib.tail outputs + else ["man"]; dontDisableStatic = true; enableParallelBuilding = true; @@ -97,6 +107,13 @@ stdenv.mkDerivation { docFiles = commonMetaFiles; }} $doc/share/doc/${pname} + ${if manpages == null + then ''echo "no manpages for this package"'' + else '' + echo "copying manpages" + cp -vr ${manpages} $man + ''} + ${postInstall} ''; @@ -104,6 +121,8 @@ stdenv.mkDerivation { ${cleanPackaging.checkForRemainingFiles} ''; + passthru = passthru // (if manpages == null then {} else { inherit manpages; }); + meta = { homepage = "https://skarnet.org/software/${pname}/"; inherit description platforms; @@ -112,6 +131,4 @@ stdenv.mkDerivation { [ pmahoney Profpatsch qyliss ] ++ maintainers; }; - inherit passthru; - } |