Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { nixpkgs ? import <nixpkgs> {}, compiler ? "ghc882", doBenchmark ? false }:
- let
- pkgs = import (builtins.fetchGit {
- name ="nixos-20.03-small";
- url = https://github.com/nixos/nixpkgs-channels/;
- ref = "nixos-20.03-small";
- rev = "afeaca75cf7bd6510699821202c25cbaf778b1ef";
- }) {};
- f = { mkDerivation, base, extra, ghc-lib, ghc-lib-parser
- , hashable, haskell-names, haskell-src-exts, ormolu, stdenv, syb
- , uniplate
- , containers
- , ghc-paths
- , cabal-install
- }:
- mkDerivation {
- pname = "arst";
- version = "0.1";
- src = ./.;
- isLibrary = false;
- isExecutable = true;
- executableHaskellDepends = [
- base extra ghc-lib ghc-lib-parser hashable haskell-names
- haskell-src-exts ormolu syb uniplate
- containers
- ghc-paths
- cabal-install
- ];
- license = stdenv.lib.licenses.mit;
- };
- haskellPackages = if compiler == "default"
- then pkgs.haskellPackages
- else pkgs.haskell.packages.${compiler};
- variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
- drv = variant (haskellPackages.callPackage f {});
- in
- if pkgs.lib.inNixShell then drv.env else drv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement