Distribution/NixOS/PackageMap.hs: make sure nix-env -qaP shows only proper Nixpkgs attributes
If we run nix-env without specifying the path to Nixpkgs, then we'll get
whatever output the local user running that tool has due to his ~/.nix-defexpr
setup, and that output may be quite different.
commit306dff016dab899bd710b101b998f84c9eacaeb6
authorPeter Simons <simons@cryp.to>
dateSat 10 Jan 2015, 13:43 (12 years ago)
parentf5e2a6a
src/Distribution/NixOS/PackageMap.hs+1−1
@@ -14,7 +14,7 @@ type Path = [Attribute]
1414
1515readNixpkgAttributeSet :: IO (Set Attribute)
1616readNixpkgAttributeSet = do
17− buf <- readProcess "nix-env" ["-qaP", "--json"] ""
17+ buf <- readProcess "nix-env" ["-qaP", "--json", "-f<nixpkgs>"] ""
1818 let pkgmap :: Either String (Map Attribute JSON.Object)
1919 pkgmap = JSON.eitherDecodeStrict (UTF8.toRep (UTF8.fromString buf))
2020 either fail (return . Map.keysSet) pkgmap