git.iko.soy/sawtooth-haskell-protos
on master help sign in
added system argument
commita456437c5396e3ddaab473427eae20fac1eb112d authoriko <ilyakooo0@gmail.com> dateSun 20 Dec 2020, 18:51 (6 years ago) parent901dcfe
1 file changed+9−4
default.nix+9−4
default.nix+9−4
@@ -1,11 +1,16 @@
1−{ sources ? import nix/sources.nix
2−, nixpkgs ? import sources.nixpkgs { }
1+{ sources ? import nix/sources.nix { inherit system; }
2+, nixpkgs ? import sources.nixpkgs { inherit system; }
3+, system ? builtins.currentSystem
34}:
45let
5− proto3-suite = import sources.proto3-suite { };
6+ proto3-suite' = import sources.proto3-suite { };
7+ proto3-suite =
8+ if system == "x86_64-linux" then proto3-suite'.proto3-suite-linux
9+ else if system == "x86_64-darwin" then proto3-suite'.proto3-suite-darwin
10+ else abort "proto3-suite only supports x86_64-linux and x86_64-darwin at the moment :(";
611 sawtooth-haskell-protos-src = nixpkgs.stdenv.mkDerivation {
712 name = "sawtooth-haskell-protos-src";
8− buildInputs = [ proto3-suite.proto3-suite ];
13+ buildInputs = [ proto3-suite ];
914 src = sources.sawtooth-core + "/protos";
1015 buildPhase = ''
1116 for f in *.proto