Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 07da1a9

Browse files
committed
Use nixpkgs pinning from common iohk-nix repo
1 parent 27c87eb commit 07da1a9

File tree

7 files changed

+26
-138
lines changed

7 files changed

+26
-138
lines changed

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
let localLib = import ./nix/lib.nix; in
21
{ config ? {}
32
, system ? builtins.currentSystem
4-
, pkgs ? localLib.importPkgs { inherit config system; }
3+
, iohkLib ? import ./nix/iohk-common.nix { inherit config system; }
4+
, pkgs ? iohkLib.cardano-sl.pkgs
55
}:
66

77
import ./nix/pkgs.nix { inherit pkgs; }

nix/fetch-nixpkgs.nix

Lines changed: 0 additions & 6 deletions
This file was deleted.

nix/iohk-common.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Imports the iohk-nix library.
2+
# The version can be overridden for debugging purposes by setting
3+
# NIX_PATH=iohk_nix=/path/to/iohk-nix
4+
5+
import (
6+
let try = builtins.tryEval <iohk_nix>;
7+
in if try.success
8+
then builtins.trace "using host <iohk_nix>" try.value
9+
else
10+
let
11+
spec = builtins.fromJSON (builtins.readFile ./iohk-nix.json);
12+
in builtins.fetchTarball {
13+
url = "${spec.url}/archive/${spec.rev}.tar.gz";
14+
inherit (spec) sha256;
15+
})

nix/iohk-nix.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"url": "https://github.com/input-output-hk/iohk-nix",
3+
"rev": "aa9911a864100ec116b8cbd1bd7f4958dad23acf",
4+
"date": "2018-11-14T11:13:03+10:00",
5+
"sha256": "1j25vbcwybnbjijr4wdgbgnq47rlfhyk07gwcahvcz53j3ha9xcb",
6+
"fetchSubmodules": false
7+
}

nix/lib.nix

Lines changed: 0 additions & 118 deletions
This file was deleted.

nix/nixpkgs-src.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

nix/regenerate.sh

100644100755
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/usr/bin/env bash
22

3-
# build (if needed) the nix-tools from the given hash
4-
NIX_TOOLS=$(nix-build https://github.com/angerman/nix-tools/archive/9b1066f5613b35037231cf2dbb6db25cb60c4205.tar.gz -A nix-tools-all-execs -j8 --no-out-link)
5-
export PATH=$NIX_TOOLS/bin:$PATH
3+
set -euo pipefail
64

7-
# stack-to-nix will transform the stack.yaml file into something
8-
# nix can understand.
9-
stack-to-nix -o nix stack.yaml > nix/.stack-pkgs.nix
5+
exec $(nix-build `dirname $0`/iohk-common.nix -A cardano-sl.regeneratePackages --no-out-link)

0 commit comments

Comments
 (0)