Pin nixpkgs and drop use of fetchgitPrivate for proto3-suite. (#8)

* Pin nixpkgs to `7ae9da426924537755ce9164fd5b5f81ce16a1c3`; minor documentation tweaks

* Remove use of `fetchgitPrivate` from `proto3-suite` toplevel pkg override attr def
This commit is contained in:
intractable 2017-03-15 18:02:26 -05:00 committed by GitHub
parent 584ae318a9
commit 081be2af78
3 changed files with 40 additions and 10 deletions

6
nixpkgs.json Normal file
View file

@ -0,0 +1,6 @@
{
"url": "https://github.com/NixOS/nixpkgs.git",
"rev": "7ae9da426924537755ce9164fd5b5f81ce16a1c3",
"date": "2017-01-31T10:35:58-06:00",
"sha256": "1fcvc066c270dd2yfir8cpj0gcslsbvw7grnk2fayb06rkppjxrf"
}

21
nixpkgs.nix Normal file
View file

@ -0,0 +1,21 @@
let
# NOTE: This is the only non-deterministic part of our system since we need a
# a starting point in order to be able to fetch the pinned `nixpkgs`. From
# that point forward our build is deterministic and pinned
#
# We only use this for the `fetchFromGitHub` utility so as long as that
# remains stable then we shouldn't have migration issues.
inherit (import <nixpkgs> { }) fetchFromGitHub;
# In order to update `nixpkgs.json` to a specific revision, run:
#
# ```bash
# $ nix-prefetch-git https://github.com/NixOS/nixpkgs.git "${REVISION}" > nixpkgs.json
# ```
nixpkgs = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
in
fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
inherit (nixpkgs) rev sha256;
}

View file

@ -46,15 +46,20 @@
# You can also add private Git dependencies in the same way, except supplying # You can also add private Git dependencies in the same way, except supplying
# the `git` URL to clone: # the `git` URL to clone:
# #
# $ cabal2nix git@github.mv.awakenetworks.net:awakenetworks/${package-name}.git > ./nix/${package-name}.nix # $ cabal2nix <your private git url>/${package-name}.git > ./nix/${package-name}.nix
# #
# `cabal2nix` also takes an optional `--revision` flag if you want to pick a # ...but also be sure to supply `fetchgit = pkgs.fetchgitPrivate` in the
# revision other than the latest one to depend on. # `haskellPackagesNew.callPackage` invocation for your private package.
# #
# If you want to test a local source checkout of a dependency, then run: # Note that `cabal2nix` also takes an optional `--revision` flag if you want to
# pick a revision other than the latest to depend on.
#
# Finally, if you want to test a local source checkout of a dependency, then
# run:
# #
# $ cabal2nix path/to/dependency/repo > nix/${package-name}.nix # $ cabal2nix path/to/dependency/repo > nix/${package-name}.nix
let let
nixpkgs = import ./nixpkgs.nix;
config = { config = {
packageOverrides = pkgs: rec { packageOverrides = pkgs: rec {
cython = pkgs.buildPythonPackage rec { cython = pkgs.buildPythonPackage rec {
@ -170,9 +175,7 @@ let
proto3-suite = proto3-suite =
pkgs.haskell.lib.dontCheck pkgs.haskell.lib.dontCheck
(haskellPackagesNew.callPackage ./nix/proto3-suite.nix { (haskellPackagesNew.callPackage ./nix/proto3-suite.nix {});
fetchgit = pkgs.fetchgitPrivate;
});
grpc-haskell-no-tests = grpc-haskell-no-tests =
pkgs.haskell.lib.overrideCabal pkgs.haskell.lib.overrideCabal
@ -265,9 +268,9 @@ let
in in
let let
linuxPkgs = import <nixpkgs> { inherit config; system = "x86_64-linux" ; }; linuxPkgs = import nixpkgs { inherit config; system = "x86_64-linux" ; };
darwinPkgs = import <nixpkgs> { inherit config; system = "x86_64-darwin"; }; darwinPkgs = import nixpkgs { inherit config; system = "x86_64-darwin"; };
pkgs = import <nixpkgs> { inherit config; }; pkgs = import nixpkgs { inherit config; };
in in
{ grpc-haskell-linux = linuxPkgs.haskellPackages.grpc-haskell; { grpc-haskell-linux = linuxPkgs.haskellPackages.grpc-haskell;