Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Import cabal new-build shell and updated stack-to-nix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
lukateras committed Sep 24, 2018
1 parent ba0b1bd commit e2a9f54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 51 deletions.
9 changes: 6 additions & 3 deletions default.nix
@@ -1,6 +1,11 @@
{ pkgs ? import ./closure.nix }: with pkgs;
{ pkgs ? import ./closure.nix, root ? ./., shell ? false }: with pkgs;

stackToNix {
# TODO: implement filtering in stack-to-nix
root = lib.cleanSource root;

inherit shell;

overrides = final: previous: with haskell.lib; {
ariadne-cardano = overrideCabal previous.ariadne-cardano (super: {
buildTools = [ git ];
Expand All @@ -19,6 +24,4 @@ stackToNix {
librarySystemDepends = with qt5; [ qtbase qttools ];
});
};

src = lib.cleanSource ./.;
}
49 changes: 1 addition & 48 deletions shell.nix
@@ -1,48 +1 @@
{ _nixpkgs ? import <nixpkgs> {} }:

let
jemalloc450 = import ./jemalloc450.nix { pkgs = nixpkgs; };
rocksdb = nixpkgs.rocksdb.override { jemalloc = jemalloc450; };

nixpkgs = import (_nixpkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "e7a327da5cffdf5e77e1924906a4f0983591bd3e";
sha256 = "1xzil4mayhggg2miwspbk12nihlszg0y4n6i4qacrxql5n75f0hr";
}){ overlays = [cabalHashes]; };

cabalHashes = sel: super: {
all-cabal-hashes = super.fetchurl {
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/b2b93ae610f5f1b51d22b191f972dc3dec8f94c6.tar.gz";
sha256 = "0bffclpqbw62xff36qlzxghr042mhv0m06k5ml4298w6fv7ly1xw";
};
};

ghc = nixpkgs.haskell.compiler.ghc822;
haskellPackages = nixpkgs.haskell.packages.ghc822;

in

nixpkgs.haskell.lib.buildStackProject {
inherit ghc;
name = "ariadne-env";
buildInputs = with nixpkgs;
[ autoreconfHook
bsdiff
gcc
git
gmp
haskellPackages.cpphs
haskellPackages.happy
icu
lzma
ncurses
openssl
openssh
rocksdb
zlib
qt5.qtbase
];
LANG="en_US.UTF-8";
QT_QPA_PLATFORM_PLUGIN_PATH="${nixpkgs.qt5.qtbase.bin}/lib/qt-5.9/plugins/platforms";
}
import ./. { shell = true; }

0 comments on commit e2a9f54

Please sign in to comment.