From 9b7b5b9608eb32a227d902e99cbf50d5dda4f4d0 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Fri, 7 Jun 2019 16:37:30 +0200 Subject: [PATCH] Ensure a consistent golang version is used throughout Nix --- derivation.nix | 2 +- nix/desktop/default.nix | 27 +++++++++++++-------------- nix/status-go/default.nix | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/derivation.nix b/derivation.nix index bdd80584e8..361427e907 100644 --- a/derivation.nix +++ b/derivation.nix @@ -10,7 +10,7 @@ let gradle = pkgs.gradle_4_10; go = pkgs.go_1_11; buildGoPackage = pkgs.buildGoPackage.override { inherit go; }; - statusDesktop = pkgs.callPackage ./nix/desktop { inherit target-os status-go pkgs; inherit (pkgs) darwin; stdenv = stdenv'; nodejs = nodejs'; }; + statusDesktop = pkgs.callPackage ./nix/desktop { inherit target-os status-go pkgs go; inherit (pkgs) darwin; stdenv = stdenv'; nodejs = nodejs'; }; statusMobile = pkgs.callPackage ./nix/mobile { inherit target-os config pkgs status-go gradle; inherit (pkgs.xcodeenv) composeXcodeWrapper; stdenv = stdenv'; nodejs = nodejs'; }; status-go = pkgs.callPackage ./nix/status-go { inherit target-os go buildGoPackage; inherit (pkgs.xcodeenv) composeXcodeWrapper; inherit (statusMobile) xcodewrapperArgs; androidPkgs = statusMobile.androidComposition; }; nodejs' = pkgs.nodejs-10_x; diff --git a/nix/desktop/default.nix b/nix/desktop/default.nix index 480c51c7d1..6824938cf0 100644 --- a/nix/desktop/default.nix +++ b/nix/desktop/default.nix @@ -1,5 +1,5 @@ { stdenv, pkgs, callPackage, target-os, - cmake, extra-cmake-modules, file, status-go, + cmake, extra-cmake-modules, file, status-go, go, darwin, nodejs }: with stdenv; @@ -8,7 +8,7 @@ let platform = callPackage ../platform.nix { inherit target-os; }; linuxPlatform = callPackage ./linux { inherit status-go; }; darwinPlatform = callPackage ./macos { inherit status-go darwin; }; - windowsPlatform = callPackage ./windows { }; + windowsPlatform = callPackage ./windows { inherit go; }; snoreNotifySources = callPackage ./cmake/snorenotify { }; qtkeychainSources = callPackage ./cmake/qtkeychain { }; selectedSources = @@ -20,16 +20,15 @@ let inherit pkgs nodejs; }; -in - { - buildInputs = [ - cmake - extra-cmake-modules - file - snoreNotifySources - qtkeychainSources - ] ++ lib.catAttrs "buildInputs" selectedSources - ++ (builtins.attrValues nodeInputs); +in { + buildInputs = [ + cmake + extra-cmake-modules + file + snoreNotifySources + qtkeychainSources + ] ++ lib.catAttrs "buildInputs" selectedSources + ++ (builtins.attrValues nodeInputs); - shellHook = lib.concatStrings (lib.catAttrs "shellHook" (selectedSources ++ [ snoreNotifySources qtkeychainSources ])); - } + shellHook = lib.concatStrings (lib.catAttrs "shellHook" (selectedSources ++ [ snoreNotifySources qtkeychainSources ])); +} diff --git a/nix/status-go/default.nix b/nix/status-go/default.nix index 77340d1e69..1120bcf1c7 100644 --- a/nix/status-go/default.nix +++ b/nix/status-go/default.nix @@ -7,7 +7,7 @@ with stdenv; let platform = callPackage ../platform.nix { inherit target-os; }; utils = callPackage ../utils.nix { inherit xcodeWrapper; }; - gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit buildGoPackage composeXcodeWrapper xcodewrapperArgs utils; }; + gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit composeXcodeWrapper xcodewrapperArgs utils buildGoPackage; }; buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit buildGoPackage go xcodeWrapper utils; }; buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit buildGoPackage go gomobile xcodeWrapper utils; }; extractStatusGoConfig = f: lib.last (lib.splitString "\n" (lib.fileContents f));