added dev and debug shells
This commit is contained in:
commit
b4dd4a3f4d
19
debug/default.nix
Normal file
19
debug/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
with import <nixpkgs> { };
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "debug";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
hyfetch
|
||||
qdirstat
|
||||
vdpauinfo
|
||||
libva-utils
|
||||
glxinfo
|
||||
acpi
|
||||
lm_sensors
|
||||
lshw
|
||||
pciutils
|
||||
usbutils
|
||||
powertop
|
||||
];
|
||||
}
|
28
development/default.nix
Normal file
28
development/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
with import <nixpkgs> { };
|
||||
|
||||
gcc11Stdenv.mkDerivation rec {
|
||||
#gccStdenv.mkDerivation rec {
|
||||
#clang16Stdenv.mkDerivation rec {
|
||||
name = "devel";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
git
|
||||
ninja
|
||||
git-lfs
|
||||
jdk19
|
||||
jetbrains.clion
|
||||
jetbrains.pycharm-community
|
||||
jetbrains.idea-community
|
||||
scala_3
|
||||
moreutils
|
||||
hotspot
|
||||
cmakeWithGui
|
||||
gnumake
|
||||
ccache
|
||||
cudatoolkit_11
|
||||
git
|
||||
python3
|
||||
linuxPackages.perf
|
||||
] ;
|
||||
shellHook = ''export CXXFLAGS="-march=native -O3"'';
|
||||
}
|
32
development/nix-cmake
Executable file
32
development/nix-cmake
Executable file
@ -0,0 +1,32 @@
|
||||
#! /usr/bin/env cached-nix-shell
|
||||
#! nix-shell -p python3 -i python3
|
||||
|
||||
# let's say you have a C++ project in Nix that you want to work on with CLion so that the Nix dependencies are available
|
||||
# put this script in your project directory
|
||||
# then, in Settings -> Build, Execution, Deployment -> Toolchains set CMake to this script
|
||||
# if you need any extra nix-shell arguments, add them to the invocation at the bottom
|
||||
|
||||
# Adapted script from https://gist.github.com/chpatrick/61a5d486dd0d806bdf07e1b1ddc85ce5
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shlex
|
||||
|
||||
scriptDir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
args = list(map(shlex.quote, sys.argv[1:]))
|
||||
|
||||
# Use the cmakeFlags set by Nix - this doesn't work with --build
|
||||
if "--build" not in args:
|
||||
args.insert(0, "$cmakeFlags")
|
||||
args.append("--no-warn-unused-cli")
|
||||
|
||||
cwd = shlex.quote(os.getcwd())
|
||||
cmd = 'cd ' + cwd + ' && cmake ' + ' '.join(args)
|
||||
|
||||
os.chdir(scriptDir)
|
||||
os.execvp("cached-nix-shell", [
|
||||
'nix-shell',
|
||||
'--pure',
|
||||
'--run', cmd
|
||||
])
|
Loading…
Reference in New Issue
Block a user