diff options
author | haslersn <sebastian.hasler@gmx.net> | 2020-05-28 14:53:46 +0200 |
---|---|---|
committer | haslersn <sebastian.hasler@gmx.net> | 2020-08-31 23:55:31 +0200 |
commit | 020b718b2b1accde72895481f383fa57c468fae8 (patch) | |
tree | 399df2e9789e676a909f657b16997bcd64e4fc03 /shell.nix | |
parent | 65288b58d8a709207b7380f7913d538e63f88c0e (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.nix | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 |