Skip to content

Instantly share code, notes, and snippets.

@dmjio
Forked from 3noch/fetch-cabal.nix
Created October 29, 2016 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmjio/fd877ec69a27ef13270285cf70fa2d86 to your computer and use it in GitHub Desktop.
Save dmjio/fd877ec69a27ef13270285cf70fa2d86 to your computer and use it in GitHub Desktop.
{ runCommand, fetchzip, cabal2nix }:
let
package-src = runCommand "package-src" {
src = fetchzip {
url = "...zip";
sha256 = "...";
};
buildInputs = [ cabal2nix ];
}
''
mkdir -p $out
cp -r $src/* $out
cd $out
cabal2nix . > package.nix
'';
in pkgs.haskellPackages.callPackage "${package-src}/package.nix" {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment