clean up nix scripts - build still working

This commit is contained in:
towards-a-new-leftypol 2023-11-28 06:06:37 -05:00
parent 5cc670fca9
commit 055bc806bc
4 changed files with 5 additions and 75 deletions

View File

@ -6,14 +6,10 @@ let
env = drv.env.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [
pkgs.haskellPackages.cabal-install
pkgs.haskell.packages.ghc.cabal-install
];
});
# pkgs = import ./nixpkgs.nix { nixpkgs = nixpkgs; };
# chandlr_pkg = pkgs.haskell.packages.ghcjs.callCabal2nix "chandlr" ./. {};
# #chandlr = nixpkgs.haskell.packages.ghcjs.callPackage chandlr_pkg {};
# chandlr = pkgs.callPackage chandlr_pkg {};
in
if pkgs.lib.inNixShell then env else drv

View File

@ -1,5 +1,4 @@
let
bootstrap = import <nixpkgs> {};
nixpkgs-src = bootstrap.fetchFromGitHub {
@ -9,32 +8,12 @@ let
sha256 = "0n4ffwwfdybphx1iyqz1p7npk8w4n78f8jr5nq8ldnx2amrkfwhl";
};
servant-src = bootstrap.fetchFromGitHub {
owner = "haskell-servant";
repo = "servant";
rev = "v0.15";
sha256 = "0n9xn2f61mprnvn9838zbl4dv2ynnl0kxxrcpf5c0igdrks8pqws";
};
miso-src = bootstrap.fetchFromGitHub {
owner = "haskell-miso";
repo = "miso";
rev = "0.21.2.0";
sha256 = "07k1rlvl9g027fp2khl9kiwla4rcn9sv8v2dzm0rzf149aal93vn";
};
config = {
packageOverrides = pkgs: rec {
haskell = pkgs.haskell // {
packages = pkgs.haskell.packages // {
ghc = pkgs.haskell.packages.ghc844.override {
overrides = self: super: with pkgs.haskell.lib; {
miso = self.callCabal2nix "miso" miso-src {};
};
};
} // {
ghc = pkgs.haskell.packages.ghc844;
} // {
# Many packages don't build on ghcjs because of a dependency on doctest
# (which doesn't build), or because of a runtime error during the test run.
@ -46,18 +25,14 @@ let
comonad = dontCheck super.comonad;
semigroupoids = dontCheck super.semigroupoids;
lens = dontCheck super.lens;
miso = self.callCabal2nix "miso" miso-src {};
servant = dontCheck (doJailbreak (self.callCabal2nix "servant" (servant-src + "/servant") {}));
servant = dontCheck super.servant;
};
};
};
};
};
};
in
import nixpkgs-src { inherit config; }

View File

@ -1,31 +0,0 @@
{ nixpkgs ? import <nixpkgs> {} }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, base, ghcjs-base, cabal-install
}:
mkDerivation {
pname = "chandlr";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
base
ghcjs-base
];
testHaskellDepends = [ cabal-install ];
license = "unknown";
#hydraPlatforms = stdenv.lib.platforms.none;
};
haskellPackages = pkgs.haskell.packages.ghcjs;
drv = haskellPackages.callPackage f {
cabal-install = haskellPackages.cabal-install;
};
in
if pkgs.lib.inNixShell then drv.env else drv

View File

@ -1,10 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.haskell.compiler.ghcjs
pkgs.haskell.compiler.ghc810
pkgs.haskell.packages.ghcjs.ghcjs-base
pkgs.haskell.packages.ghc810.cabal-install
];
}