git.iko.soy/typeable/cabal2nix
on master help sign in
Be slightly more explicit about lib/exe status.
commit2f675aaf88e7e3b0890a533f1d80dc388caeeb88 authorAndres Loeh <mail@andres-loeh.de> dateMon 8 Aug 2011, 17:20 (15 years ago) parent71e9ace
1 file changed+3−3
src/Cabal2Nix/Package.hs+3−3
src/Cabal2Nix/Package.hs+3−3
@@ -69,8 +69,8 @@ showNixPkg (Pkg name ver sha256 url desc lic isLib isExe deps
6969 attr "pname" $ doubleQuotes (text name),
7070 attr "version" $ doubleQuotes showVer,
7171 attr "sha256" $ doubleQuotes (text sha256),
72− boolattr "isLibrary" True isLib,
73− boolattr "isExecutable" False isExe,
72+ boolattr "isLibrary" (not isLib) isLib,
73+ boolattr "isExecutable" (not isLib || isExe) isExe,
7474 listattr "buildDepends" pkgDeps,
7575 listattr "buildTools" pkgBuildTools,
7676 listattr "extraLibraries" pkgLibs,
@@ -96,7 +96,7 @@ showNixPkg (Pkg name ver sha256 url desc lic isLib isExe deps
9696 ]
9797 attr n v = text n <+> equals <+> v <> semi
9898 onlyIf p d = if not (null p) then d else empty
99− boolattr n d v = if v /= d then
99+ boolattr n p v = if p then
100100 attr n (if v then text "true" else text "false")
101101 else empty
102102 listattr n vs = onlyIf vs $ sep [