mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
haskell: don't error if isLibrary = true and no libraries exist
If empty directory isn't deleted, referer depenedencies will fail with: cp: missing destination file operand after '/tmp/nix-build-cabal-helper-0.8.0.2.drv-0/setup-package.conf.d/' This is currently only the case for cabal-install, as cabal2nix doesn't handle well buildable=False flags due to long-standing bugs in Cabal itself.
This commit is contained in:
parent
b3af2cd962
commit
6fd5287c36
@ -394,6 +394,9 @@ stdenv.mkDerivation ({
|
|||||||
local pkgId=$( ${gnused}/bin/sed -n -e 's|^id: ||p' $packageConfFile )
|
local pkgId=$( ${gnused}/bin/sed -n -e 's|^id: ||p' $packageConfFile )
|
||||||
mv $packageConfFile $packageConfDir/$pkgId.conf
|
mv $packageConfFile $packageConfDir/$pkgId.conf
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# delete confdir if there are no libraries
|
||||||
|
find $packageConfDir -maxdepth 0 -empty -delete;
|
||||||
''}
|
''}
|
||||||
${optionalString isGhcjs ''
|
${optionalString isGhcjs ''
|
||||||
for exeDir in "$out/bin/"*.jsexe; do
|
for exeDir in "$out/bin/"*.jsexe; do
|
||||||
|
Loading…
Reference in New Issue
Block a user