packages feed

cabal2nix 1.6 → 1.7

raw patch · 2 files changed

+6/−3 lines, 2 files

Files

cabal2nix.cabal view
@@ -1,5 +1,5 @@ Name:                   cabal2nix-Version:                1.6+Version:                1.7 Copyright:              (c) 2011 Peter Simons License:                BSD3 License-File:           LICENSE@@ -20,7 +20,7 @@ 			file. That path can be an HTTP URL or local file 			path. For example: 			.-			> cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.6/cabal2nix.cabal+			> cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.7/cabal2nix.cabal 			> cabal2nix file:///tmp/cabal2nix.cabal 			> cabal2nix /tmp/cabal2nix.cabal 0m7zgsd1pxmw504xpvl7dg25ana6dkk1mcyjj4c1wdbkvhvbn3gn 			.
cabal2nix.hs view
@@ -106,7 +106,10 @@   | otherwise                   = readFile path  hashPackage :: GenericPackageDescription -> IO String-hashPackage pkg = readProcess "bash" ["-c", "exec nix-prefetch-url 2>/dev/tty " ++ url] ""+hashPackage pkg = do+    hash <- readProcess "bash" ["-c", "exec nix-prefetch-url 2>/dev/tty " ++ url] ""+    return (reverse (dropWhile (=='\n') (reverse hash)))+   where     url = "http://hackage.haskell.org/packages/archive/" ++ name ++ "/" ++ version ++ "/" ++ name ++ "-" ++ version ++ ".tar.gz"     PackageIdentifier (PackageName name) version' = package (packageDescription pkg)