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.
This commit is contained in:
parent
ea324b3cfc
commit
a50653295d
@ -18,12 +18,15 @@ in {
|
|||||||
, configureFlags
|
, configureFlags
|
||||||
# mostly for moving and deleting files from the build directory
|
# mostly for moving and deleting files from the build directory
|
||||||
# : lines
|
# : lines
|
||||||
, postInstall
|
, postInstall ? ""
|
||||||
|
# : lines
|
||||||
|
, postFixup ? ""
|
||||||
# : list Maintainer
|
# : list Maintainer
|
||||||
, maintainers ? []
|
, maintainers ? []
|
||||||
|
# : attrs
|
||||||
|
, meta ? {}
|
||||||
}:
|
, ...
|
||||||
|
} @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -50,16 +53,12 @@ let
|
|||||||
"README.*"
|
"README.*"
|
||||||
];
|
];
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation ({
|
||||||
name = "${pname}-${version}";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://skarnet.org/software/${pname}/${pname}-${version}.tar.gz";
|
url = "https://skarnet.org/software/${pname}/${pname}-${version}.tar.gz";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit outputs;
|
|
||||||
|
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -84,13 +83,11 @@ in stdenv.mkDerivation {
|
|||||||
noiseFiles = commonNoiseFiles;
|
noiseFiles = commonNoiseFiles;
|
||||||
docFiles = commonMetaFiles;
|
docFiles = commonMetaFiles;
|
||||||
}} $doc/share/doc/${pname}
|
}} $doc/share/doc/${pname}
|
||||||
|
'' + postInstall;
|
||||||
${postInstall}
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
${cleanPackaging.checkForRemainingFiles}
|
${cleanPackaging.checkForRemainingFiles}
|
||||||
'';
|
'' + postFixup;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://skarnet.org/software/${pname}/";
|
homepage = "https://skarnet.org/software/${pname}/";
|
||||||
@ -98,6 +95,9 @@ in stdenv.mkDerivation {
|
|||||||
license = stdenv.lib.licenses.isc;
|
license = stdenv.lib.licenses.isc;
|
||||||
maintainers = with lib.maintainers;
|
maintainers = with lib.maintainers;
|
||||||
[ pmahoney Profpatsch ] ++ maintainers;
|
[ pmahoney Profpatsch ] ++ maintainers;
|
||||||
};
|
} // meta;
|
||||||
|
|
||||||
}
|
} // builtins.removeAttrs args [
|
||||||
|
"sha256" "configureFlags" "postInstall" "postFixup"
|
||||||
|
"meta" "description" "platforms" "maintainers"
|
||||||
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user