summaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authorhaslersn <sebastian.hasler@gmx.net>2020-05-28 14:53:46 +0200
committerhaslersn <sebastian.hasler@gmx.net>2020-08-31 23:55:31 +0200
commit020b718b2b1accde72895481f383fa57c468fae8 (patch)
tree399df2e9789e676a909f657b16997bcd64e4fc03 /shell.nix
parent65288b58d8a709207b7380f7913d538e63f88c0e (diff)
shell.nix: Add releaseMode flag
If `releaseMode = true`, then we don't include convenient development tools in the `nativeBuildInputs`. Most notable, `ccache` which would prevent the derivation from being buildable will not be included and thus `shell.nix` can be built using ``` $ nix build -f shell.nix --arg releaseMode true or: $ nix-build shell.nix --arg releaseMode true ```
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/shell.nix b/shell.nix
index ad58db1a8a..615af4d1d3 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,6 +1,7 @@
{ nixroot ? (import <nixpkgs> {})
, defaultLv2Plugins ? false
, lv2Plugins ? []
+, releaseMode ? false
}:
let inherit (nixroot) stdenv pkgs lib
chromaprint fftw flac libid3tag libmad libopus libshout libsndfile lilv
@@ -97,17 +98,21 @@ in stdenv.mkDerivation rec {
echo " debug - runs Mixxx inside gdb"
'';
- src = nix-gitignore.gitignoreSource ''
+ src = if releaseMode then (nix-gitignore.gitignoreSource ''
/cbuild
- '' ./.;
+ /.envrc
+ /result
+ /shell.nix
+ '' ./.) else null;
nativeBuildInputs = [
- ccache # If you want to build Mixxx as a derivation, then you have to remove ccache here.
cmake
+ ] ++ (if !releaseMode then [
+ ccache
gdb
git-clang-format
shell-configure shell-build shell-run shell-debug
- ];
+ ] else []);
buildInputs = [
chromaprint fftw flac libid3tag libmad libopus libshout libsndfile