git.iko.soy/typeable/cabal2nix
on master help sign in
distribution-nixpkgs: pretty-print 'editedCabalFile` only if revision > 0
b7dac87Peter Simons
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/Derivation.hs+1−1
@@ -102,7 +102,7 @@ instance Pretty Derivation where
102 , attr "version" $ doubleQuotes $ disp (packageVersion _pkgid)
102 , attr "version" $ doubleQuotes $ disp (packageVersion _pkgid)
103 , sourceAttr _src
103 , sourceAttr _src
104 , onlyIf (_revision > 0) $ attr "revision" $ doubleQuotes $ int _revision
104 , onlyIf (_revision > 0) $ attr "revision" $ doubleQuotes $ int _revision
105− , onlyIf (not (null _editedCabalFile)) $ attr "editedCabalFile" $ string _editedCabalFile
105+ , onlyIf (not (null _editedCabalFile) && _revision > 0) $ attr "editedCabalFile" $ string _editedCabalFile
106 , listattr "configureFlags" empty (map (show . show) renderedFlags)
106 , listattr "configureFlags" empty (map (show . show) renderedFlags)
107 , boolattr "isLibrary" (not _isLibrary || _isExecutable) _isLibrary
107 , boolattr "isLibrary" (not _isLibrary || _isExecutable) _isLibrary
108 , boolattr "isExecutable" (not _isLibrary || _isExecutable) _isExecutable
108 , boolattr "isExecutable" (not _isLibrary || _isExecutable) _isExecutable