summaryrefslogtreecommitdiffstats
path: root/env.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-08-03 15:44:49 +0200
committertv <tv@krebsco.de>2021-08-03 15:45:03 +0200
commit71a3f4e8efa833cc1a8209ab336ac8c454cc2f9b (patch)
tree799b6b6a7ddbba84673b42342b1428cba9369c39 /env.nix
parent288051f52e65857a7946e65c5a454b8b35af981b (diff)
env.nix -> shell.nix
Diffstat (limited to 'env.nix')
-rw-r--r--env.nix50
1 files changed, 0 insertions, 50 deletions
diff --git a/env.nix b/env.nix
deleted file mode 100644
index eef085c..0000000
--- a/env.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ nixpkgs ? import <nixpkgs> {} }:
-
-let
- pname = "regfish";
- version = "2";
-
- buildInputs = with pkgs; [
- hsEnv
- ];
-
- extraCmds = with pkgs; ''
- export MANPATH=$(ls -d $(echo "$PATH" | tr : \\n | sed -n 's:\(^/nix/store/[^/]\+\).*:\1/share/man:p') 2>/dev/null | tr \\n :)
- $(grep export ${hsEnv.outPath}/bin/ghc)
- '';
-
- hsEnv = hsPkgs.ghcWithPackages (self: with self;
- [
- acid-state
- cabal-install
- HandsomeSoup
- wreq
- ]
- );
-
- hsPkgs = pkgs.haskellPackages.override {
- overrides = self: super: with self; {
- };
- };
-
- pkgs = nixpkgs // staticPkgs;
- staticPkgs = with nixpkgs; {
- };
-
- #{{{ mkExports : set -> string
- # Create shell script that exports a set's attributes.
- mkExports = set: with builtins; with pkgs.lib.strings;
- let
- # XXX attribute names are not escaped, they have to be sane
- # XXX the value should not contain <newline>
- mkExport = k: "export ${k}=${escapeSh (getAttr k set)}";
- escapeSh = stringAsChars (c: "\\${c}");
- in
- concatStringsSep "\n" (map mkExport (attrNames set));
- #}}}
-
-in pkgs.myEnvFun {
- name = "${pname}-${version}";
- inherit buildInputs extraCmds;
-}
-# vim: set fdm=marker :