forked from awakesecurity/gRPC-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* enable travis ci * pin nixpkgs without NIXPATH * remove nixpkgs.json * fix type error * fix nixpkgs hash
- Loading branch information
1 parent
d6865cb
commit 853b4ac
Showing
5 changed files
with
59 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
language: nix | ||
script: nix-build --attr proto3-suite-linux release.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ rev # The Git revision of nixpkgs to fetch | ||
, sha256 # The SHA256 of the downloaded data | ||
, system ? builtins.currentSystem # This is overridable if necessary | ||
}: | ||
|
||
with { | ||
ifThenElse = { bool, thenValue, elseValue }: ( | ||
if bool then thenValue else elseValue); | ||
}; | ||
|
||
ifThenElse { | ||
bool = (0 <= builtins.compareVersions builtins.nixVersion "1.12"); | ||
|
||
# In Nix 1.12, we can just give a `sha256` to `builtins.fetchTarball`. | ||
thenValue = ( | ||
builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; | ||
inherit sha256; | ||
}); | ||
|
||
# This hack should at least work for Nix 1.11 | ||
elseValue = ( | ||
(rec { | ||
tarball = import <nix/fetchurl.nix> { | ||
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; | ||
inherit sha256; | ||
}; | ||
|
||
builtin-paths = import <nix/config.nix>; | ||
|
||
script = builtins.toFile "nixpkgs-unpacker" '' | ||
"$coreutils/mkdir" "$out" | ||
cd "$out" | ||
"$gzip" --decompress < "$tarball" | "$tar" -x --strip-components=1 | ||
''; | ||
|
||
nixpkgs = builtins.derivation { | ||
name = "nixpkgs-${builtins.substring 0 6 rev}"; | ||
|
||
builder = builtins.storePath builtin-paths.shell; | ||
|
||
args = [ script ]; | ||
|
||
inherit tarball system; | ||
|
||
tar = builtins.storePath builtin-paths.tar; | ||
gzip = builtins.storePath builtin-paths.gzip; | ||
coreutils = builtins.storePath builtin-paths.coreutils; | ||
}; | ||
}).nixpkgs); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters