summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-06-14 15:19:06 -0400
committerBen Sima <ben@bsima.me>2021-11-26 13:47:36 -0500
commitb484f952ff0a87f03caf0d993735090149f469b4 (patch)
tree91f29c21ae57a4eae172a0ccbca7b72104c6fceb
parent9dcfb66c99909d1b51a76bdaf75ddbdb030fe270 (diff)
Upgrade nixpkgs, add guile 3.0
-rw-r--r--Biz/Bild.nix59
-rw-r--r--Biz/Bild/Deps.nix79
-rw-r--r--Biz/Bild/Sources.json6
3 files changed, 74 insertions, 70 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index bcb1940..798a0dc 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -1,8 +1,8 @@
{ nixpkgs ? import ./Bild/Nixpkgs.nix }:
-with nixpkgs;
let
+ inherit (nixpkgs) lib stdenv;
ghcCompiler = "ghc884";
ghcjsCompiler = "ghcjs86";
@@ -25,8 +25,8 @@ let
haskellDeps = hpkgs: import ./Bild/Deps/Haskell.nix hpkgs;
- mkGhcPackageSet = pkgs.haskell.packages.${ghcCompiler}.ghcWithHoogle;
- #mkGhcjsPackageSet = pkgs.haskell.packages.${ghcjsCompiler}.ghcWithPackages;
+ mkGhcPackageSet = nixpkgs.haskell.packages.${ghcCompiler}.ghcWithHoogle;
+ #mkGhcjsPackageSet = nixpkgs.haskell.packages.${ghcjsCompiler}.ghcWithPackages;
in rec {
# gather data needed for compiling by analyzing the main module
@@ -71,7 +71,7 @@ in rec {
in stdenv.mkDerivation {
name = data.module;
src = ../.;
- nativeBuildInputs = [ ghc ] ++ selectAttrs data.sysdeps nixpkgs;
+ nativeBuildInputs = [ ghc ] ++ selectAttrs data.sysdeps nixpkgs.pkgs;
strictDeps = true;
buildPhase = ''
mkdir -p $out/bin
@@ -106,15 +106,15 @@ in rec {
# -main-is ${data.module} \
# -o ${data.out}
# # optimize js output
- # ${pkgs.closurecompiler}/bin/closure-compiler \
+ # ${nixpkgs.pkgs.closurecompiler}/bin/closure-compiler \
# ${data.out}/all.js > $out/static/${data.out}
# '';
# installPhase = "exit 0";
# } // { env = ghcjs; };
- env = mkShell {
+ env = pkgs.mkShell {
name = "bizdev";
- buildInputs = [
+ buildInputs = with nixpkgs.pkgs; [
# haskell deps
(mkGhcPackageSet haskellDeps)
# ghcjs doesn't need everything, and many things fail to build
@@ -131,38 +131,39 @@ in rec {
#]))
# python deps
- (nixpkgs.python38.withPackages (p:
+ (python38.withPackages (p:
[ p.black p.pylint ]))
# tools
- nixpkgs.haskell.packages.${ghcCompiler}.apply-refact
- nixpkgs.cmark
- nixpkgs.figlet
- nixpkgs.haskell.packages.${ghcCompiler}.fast-tags
- nixpkgs.hlint
- nixpkgs.lolcat
- nixpkgs.niv.niv
- nixpkgs.nixops
- nixpkgs.ormolu
- nixpkgs.python37Packages.black
- nixpkgs.python37Packages.pylint
- nixpkgs.shellcheck
- nixpkgs.wemux
- nixpkgs.gmnisrv
- nixpkgs.gmni
- (pkgs.writeScriptBin "ftags" (builtins.readFile ./Ide/ftags.sh))
+ haskell.packages.${ghcCompiler}.apply-refact
+ cmark
+ figlet
+ haskell.packages.${ghcCompiler}.fast-tags
+ hlint
+ lolcat
+ niv.niv
+ nixops
+ ormolu
+ python37Packages.black
+ python37Packages.pylint
+ shellcheck
+ wemux
+ gmnisrv
+ gmni
] ++ lib.optional nixpkgs.stdenv.isLinux [
# scheme deps (i think these are broken on macOS)
- nixpkgs.guile
- nixpkgs.inspekt3d
- nixpkgs.libfive
+ guile
+ inspekt3d
+ libfive
- nixpkgs.ccze
+ ccze
];
shellHook = ". ${./Bild/ShellHook.sh}";
};
- os = cfg: (nixos (args: cfg)).toplevel;
+ os = cfg: (nixpkgs.nixos (args: cfg)).toplevel;
sources = nixpkgs.sources;
+
+ pkgs = nixpkgs.pkgs;
}
diff --git a/Biz/Bild/Deps.nix b/Biz/Bild/Deps.nix
index fd15d9e..bf5538e 100644
--- a/Biz/Bild/Deps.nix
+++ b/Biz/Bild/Deps.nix
@@ -1,56 +1,59 @@
-_: pkgs:
+self: super:
let
- buildCabal = self: name:
- self.callCabal2nix name pkgs.sources.${name} {};
- buildCabalSubdir = self: {name, src ? pkgs.sources.${name}, subdir ? name}:
- self.callCabal2nix name (src + "/${subdir}") {};
+ buildCabal = sel: name:
+ sel.callCabal2nix name super.sources.${name} {};
+ buildCabalSubdir = sel: {name, src ? super.sources.${name}, subdir ? name}:
+ sel.callCabal2nix name (src + "/${subdir}") {};
ghc = "ghc884";
in rec
{
- haskell = pkgs.haskell // {
- packages = pkgs.haskell.packages // {
- "${ghc}" = pkgs.haskell.packages."${ghc}".override (old: {
- overrides = with pkgs.pkgs.haskell.lib; self: super:
- pkgs.overridePinnedDeps (buildCabal self) // {
- acid-state = dontCheck super.acid-state; # mac: "too many open files"
+ haskell = super.haskell // {
+ packages = super.haskell.packages // {
+ "${ghc}" = super.haskell.packages."${ghc}".override (old: {
+ overrides = with super.pkgs.haskell.lib; sel: sup:
+ super.overridePinnedDeps (buildCabal sel) // {
+ acid-state = dontCheck sup.acid-state; # mac: "too many open files"
ghcjs-base = null; # otherwise ghc tries to build this via overridePinnedDeps
- servant-auth = buildCabalSubdir self {name = "servant-auth";};
- servant-server = doJailbreak super.servant-server;
- stripe-haskell = dontCheck super.stripe-haskell;
- stripe-http-client = dontCheck super.stripe-http-client;
- temporary = dontCheck super.temporary;
- wai-middleware-metrics = dontCheck super.wai-middleware-metrics;
+ servant-auth = buildCabalSubdir sel {name = "servant-auth";};
+ servant-server = doJailbreak sup.servant-server;
+ stripe-haskell = dontCheck sup.stripe-haskell;
+ stripe-http-client = dontCheck sup.stripe-http-client;
+ temporary = dontCheck sup.temporary;
+ wai-middleware-metrics = dontCheck sup.wai-middleware-metrics;
};
});
#ghcjs86 = pkgs.haskell.packages.ghcjs86.override (old: {
- # overrides = with pkgs.haskell.lib; self: super:
- # pkgs.overridePinnedDeps (buildCabal self) // {
- # Glob = dontCheck super.Glob;
- # QuickCheck = dontCheck super.QuickCheck;
- # aeson = dontCheck super.aeson;
- # base-compat-batteries = dontCheck super.base-compat-batteries;
- # clay = dontCheck super.clay;
- # comonad = dontCheck super.comonad;
- # ghcjs-base = dontCheck (buildCabal self "ghcjs-base");
- # jsaddle-warp = dontCheck (buildCabalSubdir self {
+ # overrides = with pkgs.haskell.lib; sel: sup:
+ # super.overridePinnedDeps (buildCabal sel) // {
+ # Glob = dontCheck sup.Glob;
+ # QuickCheck = dontCheck sup.QuickCheck;
+ # aeson = dontCheck sup.aeson;
+ # base-compat-batteries = dontCheck sup.base-compat-batteries;
+ # clay = dontCheck sup.clay;
+ # comonad = dontCheck sup.comonad;
+ # ghcjs-base = dontCheck (buildCabal sel "ghcjs-base");
+ # jsaddle-warp = dontCheck (buildCabalSubdir sel {
# name = "jsaddle-warp";
# src = pkgs.sources.jsaddle;
# });
- # http-types = dontCheck super.http-types;
- # network-uri= dontCheck super.network-uri;
- # scientific = dontCheck super.scientific; # takes forever
- # servant = dontCheck super.servant;
- # servant-auth = buildCabalSubdir self "servant-auth";
- # tasty-quickcheck = dontCheck super.tasty-quickcheck;
- # temporary = dontCheck super.temporary;
- # time-compat = dontCheck super.time-compat;
- # vector = dontCheck super.vector;
+ # http-types = dontCheck sup.http-types;
+ # network-uri= dontCheck sup.network-uri;
+ # scientific = dontCheck sup.scientific; # takes forever
+ # servant = dontCheck sup.servant;
+ # servant-auth = buildCabalSubdir sel "servant-auth";
+ # tasty-quickcheck = dontCheck sup.tasty-quickcheck;
+ # temporary = dontCheck sup.temporary;
+ # time-compat = dontCheck sup.time-compat;
+ # vector = dontCheck sup.vector;
# };
#});
};
};
- guile-opengl = pkgs.callPackage ./Deps/guile-opengl.nix {};
- inspekt3d = pkgs.callPackage ./Deps/inspekt3d.nix {};
+ autogen = super.autogen.overrideAttrs (old: old // {
+ buildInputs = super.lib.lists.remove super.guile old.buildInputs ++ [super.guile_2_0];
+ });
+ guile-opengl = super.callPackage ./Deps/guile-opengl.nix {};
+ inspekt3d = super.callPackage ./Deps/inspekt3d.nix {};
}
diff --git a/Biz/Bild/Sources.json b/Biz/Bild/Sources.json
index d2eac19..b313748 100644
--- a/Biz/Bild/Sources.json
+++ b/Biz/Bild/Sources.json
@@ -125,10 +125,10 @@
"name": "nixpkgs",
"owner": "simatime",
"repo": "git://simatime.com/nixpkgs.git",
- "rev": "fc19bcfcbf7d3a7511cccccacbe338abef57cc0a",
- "sha256": "1zlisljka8hd9acrza6cf8n5izzw8g9qmv8hl3lzjdyhsavzi9rf",
+ "rev": "11452e4fe3b4afe566b47f1f85c2cec863a4f5bb",
+ "sha256": "0csm6wxf1s6vx9kl0yl28lgiwnxans0023ib47qlrjbkmpaqy4b8",
"type": "tarball",
- "url": "https://simatime.com/archive/nixpkgs/biz/fc19bcfcbf7d3a7511cccccacbe338abef57cc0a.tar.gz",
+ "url": "https://simatime.com/archive/nixpkgs/biz/11452e4fe3b4afe566b47f1f85c2cec863a4f5bb.tar.gz",
"url_template": "https://simatime.com/archive/<name>/<branch>/<rev>.tar.gz"
},
"regex-applicative": {