summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-12-09 01:10:54 +0000
committerAlyssa Ross <hi@alyssa.is>2019-12-16 13:27:10 +0000
commita50653295df5e2565b4a6a316923f9e939f1945b (patch)
tree298479133fbbab8fb0afc161254a8b0d85537bcc /pkgs
parentea324b3cfcc47eda495de59b8e7ef1c185b8b923 (diff)
downloadnixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.tar
nixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.tar.gz
nixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.tar.bz2
nixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.tar.lz
nixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.tar.xz
nixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.tar.zst
nixpkgs-a50653295df5e2565b4a6a316923f9e939f1945b.zip
buildSkawarePackage: pass through extra args
This allows things like hooks other than postInstall to be passed
through to mkDerivation, which is very useful when customising or
debugging a package.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/skaware/build-skaware-package.nix30
1 files changed, 15 insertions, 15 deletions
diff --git a/pkgs/build-support/skaware/build-skaware-package.nix b/pkgs/build-support/skaware/build-skaware-package.nix
index 9b159a994c8..9e4456a3a15 100644
--- a/pkgs/build-support/skaware/build-skaware-package.nix
+++ b/pkgs/build-support/skaware/build-skaware-package.nix
@@ -18,12 +18,15 @@ in {
 , configureFlags
   # mostly for moving and deleting files from the build directory
   # : lines
-, postInstall
+, postInstall ? ""
+  # : lines
+, postFixup ? ""
   # : list Maintainer
 , maintainers ? []
-
-
-}:
+  # : attrs
+, meta ? {}
+, ...
+} @ args:
 
 let
 
@@ -50,16 +53,12 @@ let
     "README.*"
   ];
 
-in stdenv.mkDerivation {
-  name = "${pname}-${version}";
-
+in stdenv.mkDerivation ({
   src = fetchurl {
     url = "https://skarnet.org/software/${pname}/${pname}-${version}.tar.gz";
     inherit sha256;
   };
 
-  inherit outputs;
-
   dontDisableStatic = true;
   enableParallelBuilding = true;
 
@@ -84,13 +83,11 @@ in stdenv.mkDerivation {
        noiseFiles = commonNoiseFiles;
        docFiles = commonMetaFiles;
      }} $doc/share/doc/${pname}
-
-    ${postInstall}
-  '';
+  '' + postInstall;
 
   postFixup = ''
     ${cleanPackaging.checkForRemainingFiles}
-  '';
+  '' + postFixup;
 
   meta = {
     homepage = "https://skarnet.org/software/${pname}/";
@@ -98,6 +95,9 @@ in stdenv.mkDerivation {
     license = stdenv.lib.licenses.isc;
     maintainers = with lib.maintainers;
       [ pmahoney Profpatsch ] ++ maintainers;
-  };
+  } // meta;
 
-}
+} // builtins.removeAttrs args [
+  "sha256" "configureFlags" "postInstall" "postFixup"
+  "meta" "description" "platforms"  "maintainers"
+])