polly wanna cracker
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.

29 lines
809 B

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. { nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
  2. let
  3. inherit (nixpkgs) pkgs;
  4. f = { mkDerivation, base, lib, mtl, network }:
  5. mkDerivation {
  6. pname = "parrotbot";
  7. version = "0.0.0.0";
  8. src = ./.;
  9. isLibrary = false;
  10. isExecutable = true;
  11. executableHaskellDepends = [ base mtl network ];
  12. description = "polly wanna cracker";
  13. license = lib.licenses.gpl3Plus;
  14. };
  15. haskellPackages = if compiler == "default"
  16. then pkgs.haskellPackages
  17. else pkgs.haskell.packages.${compiler};
  18. variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
  19. drv = variant (haskellPackages.callPackage f {});
  20. in
  21. if pkgs.lib.inNixShell then drv.env else drv