Skip to content

Instantly share code, notes, and snippets.

@PierreR
Last active November 5, 2019 10:38
Show Gist options
  • Save PierreR/dc309eb74c34d23913bc3a8686da3406 to your computer and use it in GitHub Desktop.
Save PierreR/dc309eb74c34d23913bc3a8686da3406 to your computer and use it in GitHub Desktop.
Haskell environment with mkShell
{ mkDerivation, aeson, ascii-progress, async, base
, concurrent-output, dhall, directory, filepath, haskeline, lens
, neat-interpolation, optparse-applicative, prettyprinter
, prettyprinter-ansi-terminal, process, protolude, raw-strings-qq
, req, stdenv, tasty, tasty-discover, tasty-golden, tasty-hunit
, text, transformers, turtle
}:
mkDerivation {
pname = "cicd-shell";
version = "2.7.1";
src = ./.;
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
aeson base concurrent-output dhall directory filepath haskeline
lens neat-interpolation optparse-applicative prettyprinter
prettyprinter-ansi-terminal process protolude raw-strings-qq req
text transformers
];
executableHaskellDepends = [
ascii-progress async base directory lens text turtle
];
testHaskellDepends = [
base filepath tasty tasty-discover tasty-golden tasty-hunit text
];
testToolDepends = [ tasty-discover ];
homepage = "ssh://[email protected]:7999/cicd/salt-shell.git";
description = "Command line tool that interfaces cicd services";
license = stdenv.lib.licenses.bsd3;
}
{
nixpkgs ? (import ./nix/sources.nix).nixpkgs
}:
let
pkgs = import nixpkgs {};
cicd-shell = pkgs.haskellPackages.callPackage ./cicd-shell.nix {};
in
{
inherit cicd-shell;
}
let
nixpkgs = (import ./nix/sources.nix).nixpkgs;
pkgs = import nixpkgs {};
in pkgs.mkShell {
buildInputs = [
pkgs.zlib.dev
pkgs.zlib.out
pkgs.ghc
# WHAT DO I NEED HERE ? (import ./release.nix {inherit nixpkgs;}).cicd-shell.env.nativeBuildInputs
];
}
let
nixpkgs = (import ./nix/sources.nix).nixpkgs;
pkgs = import nixpkgs {};
ghcEnv = pkgs.haskellPackages.ghcWithPackages (hpkgs: (import ./release.nix {inherit nixpkgs;}).cicd-shell.propagatedBuildInputs);
in pkgs.mkShell {
buildInputs = [
pkgs.zlib.dev
pkgs.zlib.out
ghcEnv
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment