revisit
This commit is contained in:
parent
80581e483f
commit
3358cb8c43
2 changed files with 6 additions and 30 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
dist/**
|
dist/**
|
||||||
dist-newstyle/
|
dist-newstyle/
|
||||||
.*.swp
|
.*.swp
|
||||||
|
.direnv/
|
||||||
|
.envrc
|
||||||
|
|
34
shell.nix
34
shell.nix
|
@ -1,33 +1,7 @@
|
||||||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
raycharles = pkgs.haskellPackages.callCabal2nix "raycharles" (gitignore ./.) {};
|
||||||
inherit (nixpkgs) pkgs;
|
gitignore = dir: pkgs.nix-gitignore.gitignoreSource [] dir;
|
||||||
|
|
||||||
f = { mkDerivation, base, deepseq, linear, matrix, monad-loops
|
|
||||||
, parallel, stdenv, suspend, vector, vty
|
|
||||||
}:
|
|
||||||
mkDerivation {
|
|
||||||
pname = "raycharles";
|
|
||||||
version = "0.0.0.0";
|
|
||||||
src = ./.;
|
|
||||||
isLibrary = false;
|
|
||||||
isExecutable = true;
|
|
||||||
executableHaskellDepends = [
|
|
||||||
base deepseq linear matrix monad-loops parallel suspend vector vty
|
|
||||||
];
|
|
||||||
description = "A simple raytracer on the Console";
|
|
||||||
license = stdenv.lib.licenses.bsd3;
|
|
||||||
};
|
|
||||||
|
|
||||||
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
|
in
|
||||||
|
raycharles.env
|
||||||
if pkgs.lib.inNixShell then drv.env else drv
|
|
||||||
|
|
Loading…
Reference in a new issue