From 7073c22ea0636787c77d9ad4f5b8f09feb072b3c Mon Sep 17 00:00:00 2001 From: iori Date: Sun, 13 Dec 2020 18:33:39 +0100 Subject: [PATCH] Override nixpkgs for stack this make sure both ghc 8.10.1 and 8.10.2 are available for nixos --- README.md | 4 ++-- nixpkgs.nix | 9 +++++++++ stack-8.10.1.yaml | 3 ++- stack-8.10.2.yaml | 3 ++- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 nixpkgs.nix diff --git a/README.md b/README.md index 50a210e..03ebebd 100644 --- a/README.md +++ b/README.md @@ -60,14 +60,14 @@ Then it needs to parse the hie files and recover any useful information. Build with: ```bash -stack build izuna-builder --stack-yaml=stack-8.10.1.yaml +stack build izuna-builder --stack-yaml=stack-8.10.1.yaml --no-nix ``` izuna-server is a simple server that returns the processed hie files for the plugin. Build with: ```bash -stack build izuna-server --stack-yaml=stack-8.10.1.yaml +stack build izuna-server --stack-yaml=stack-8.10.1.yaml --no-nix ``` ## Inspirations diff --git a/nixpkgs.nix b/nixpkgs.nix new file mode 100644 index 0000000..53b9524 --- /dev/null +++ b/nixpkgs.nix @@ -0,0 +1,9 @@ +let + rev = "2c0f6135aab77ff942b615228882c7dd996e0882"; + extractedTarball = fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; + sha256 = "sha256:00yg8dck4ymcifrxsknnpms52n16xnb8yiqjkby002mbm2aflf45"; + }; +in + # extractedTarball will be a directory here, and 'import' will automatically append /default.nix here +import extractedTarball diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index 03ea64c..d703213 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -15,4 +15,5 @@ extra-deps: nix: enable: true - packages: [ zlib ] \ No newline at end of file + packages: [ zlib ] + path: [nixpkgs=./nixpkgs.nix] diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index a42c84f..3257097 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -8,4 +8,5 @@ extra-deps: nix: enable: true - packages: [ zlib ] \ No newline at end of file + packages: [ zlib ] + path: [nixpkgs=./nixpkgs.nix]