From f0f50bf1dcd569c8b290e8d052dde828d1452553 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 9 Feb 2019 10:24:22 +0800 Subject: [PATCH] nix: cleanup --- nix/artiq-dev.nix | 6 ++---- nix/conda-build.nix | 10 ++-------- nix/release.nix | 5 ++--- nix/shell-dev.nix | 4 +++- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/nix/artiq-dev.nix b/nix/artiq-dev.nix index 709607f25..479352d2c 100644 --- a/nix/artiq-dev.nix +++ b/nix/artiq-dev.nix @@ -1,7 +1,6 @@ -{runScript ? "bash", extraProfile ? ""}: +{ pkgs ? import {}}: let - pkgs = import {}; artiqpkgs = import ./default.nix { inherit pkgs; }; in pkgs.buildFHSUserEnv { @@ -30,8 +29,7 @@ in openocd ]) ); - runScript = runScript; profile = '' export TARGET_AR=${artiqpkgs.binutils-or1k}/bin/or1k-linux-ar - '' + extraProfile; + ''; } diff --git a/nix/conda-build.nix b/nix/conda-build.nix index c333b9e04..6780ff3c7 100644 --- a/nix/conda-build.nix +++ b/nix/conda-build.nix @@ -1,12 +1,6 @@ -# nix-build -E "with import {}; callPackage ./conda-build.nix {}" +{ pkgs ? import {}}: -{ stdenv -, fetchurl -, runCommand -, buildFHSUserEnv -, libselinux -, xorg -}: +with pkgs; let condaDeps = [ stdenv.cc xorg.libSM xorg.libICE xorg.libXrender libselinux ]; diff --git a/nix/release.nix b/nix/release.nix index 7c65a6454..e67ba467b 100644 --- a/nix/release.nix +++ b/nix/release.nix @@ -1,9 +1,8 @@ { pkgs ? import {}}: -with pkgs; let - artiqPkgs = import ./default.nix {}; + artiqPkgs = import ./default.nix { inherit pkgs; }; jobs = rec { - conda-artiq = callPackage ./conda-build.nix {}; + conda-artiq = import ./conda-build.nix { inherit pkgs; }; } // artiqPkgs; in jobs diff --git a/nix/shell-dev.nix b/nix/shell-dev.nix index ee2e8a764..d7ff9a076 100644 --- a/nix/shell-dev.nix +++ b/nix/shell-dev.nix @@ -1,4 +1,6 @@ +{ pkgs ? import {}}: + let - artiq-dev = import ./artiq-dev.nix {}; + artiq-dev = import ./artiq-dev.nix { inherit pkgs; }; in artiq-dev.env