1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

haskellPackages.mkDerivation: Add support for sourceRoot and setSourceRoot arguments (#351226)

This commit is contained in:
maralorn 2024-11-01 23:29:42 +01:00 committed by GitHub
commit 51031f223c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -191,6 +191,10 @@ and `version` from Hackage.
`sha256`
: Hash to use for the default case of `src`.
`sourceRoot`, `setSourceRoot`
: Passed to `stdenv.mkDerivation`; see [“Variables controlling the unpack
phase”](#variables-controlling-the-unpack-phase).
`revision`
: Revision number of the updated cabal file to fetch from Hackage.
If `null` (which is the default value), the one included in `src` is used.

View file

@ -34,6 +34,8 @@ in
, version, revision ? null
, sha256 ? null
, src ? fetchurl { url = "mirror://hackage/${pname}-${version}.tar.gz"; inherit sha256; }
, sourceRoot ? null
, setSourceRoot ? null
, buildDepends ? [], setupHaskellDepends ? [], libraryHaskellDepends ? [], executableHaskellDepends ? []
, buildTarget ? ""
, buildTools ? [], libraryToolDepends ? [], executableToolDepends ? [], testToolDepends ? [], benchmarkToolDepends ? []
@ -825,6 +827,8 @@ stdenv.mkDerivation ({
;
}
// optionalAttrs (args ? sourceRoot) { inherit sourceRoot; }
// optionalAttrs (args ? setSourceRoot) { inherit setSourceRoot; }
// optionalAttrs (args ? preCompileBuildDriver) { inherit preCompileBuildDriver; }
// optionalAttrs (args ? postCompileBuildDriver) { inherit postCompileBuildDriver; }
// optionalAttrs (args ? preUnpack) { inherit preUnpack; }