Automate Haskell development with nixpkgs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

package.nix 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ################################################################################
  2. #
  3. # This file is part of the package nix-hs. It is subject to the license
  4. # terms in the LICENSE file found in the top-level directory of this
  5. # distribution and at:
  6. #
  7. # git://git.devalot.com/nix-hs.git
  8. #
  9. # No part of this package, including this file, may be copied, modified,
  10. # propagated, or distributed except according to the terms contained in
  11. # the LICENSE file.
  12. ################################################################################
  13. { stdenvNoCC, pkgs, lib
  14. , bash, cabal2nix, haskellPackages
  15. }:
  16. with lib;
  17. let
  18. drv = stdenvNoCC.mkDerivation rec {
  19. name = "nix-hs-${version}";
  20. version = "0.3.0";
  21. phases = [ "installPhase" ];
  22. installPhase = ''
  23. mkdir -p $out/bin $out/templates $out/lib
  24. export bash=${bash}
  25. export cabal2nix=${cabal2nix}
  26. export templates=$out/templates
  27. export interactive=$out/lib/interactive.nix
  28. substituteAll ${../src/nix-hs.sh} $out/bin/nix-hs
  29. chmod 0555 $out/bin/nix-hs
  30. install -m0444 ${../templates/default.nix} $out/templates/default.nix
  31. install -m0444 ${../nix/interactive.nix} $out/lib/interactive.nix
  32. '';
  33. };
  34. in {
  35. callPackage = pkgs.callPackage ./call-package.nix { };
  36. } // drv