git.iko.soy/typeable/cabal2nix
on master help sign in
Distribution/NixOS/PackageMap.hs: make sure nix-env -qaP shows only proper Nixpkgs attributes
306dff0Peter Simons
src/Distribution/NixOS/PackageMap.hs+1−1
@@ -14,7 +14,7 @@ type Path = [Attribute]
14
14
15readNixpkgAttributeSet :: IO (Set Attribute)
15readNixpkgAttributeSet :: IO (Set Attribute)
16readNixpkgAttributeSet = do
16readNixpkgAttributeSet = do
17− buf <- readProcess "nix-env" ["-qaP", "--json"] ""
17+ buf <- readProcess "nix-env" ["-qaP", "--json", "-f<nixpkgs>"] ""
18 let pkgmap :: Either String (Map Attribute JSON.Object)
18 let pkgmap :: Either String (Map Attribute JSON.Object)
19 pkgmap = JSON.eitherDecodeStrict (UTF8.toRep (UTF8.fromString buf))
19 pkgmap = JSON.eitherDecodeStrict (UTF8.toRep (UTF8.fromString buf))
20 either fail (return . Map.keysSet) pkgmap
20 either fail (return . Map.keysSet) pkgmap