commit workign state, dunno. Kinda misc.
This commit is contained in:
parent
b4dd4a3f4d
commit
ac702dfa41
6 changed files with 103 additions and 3 deletions
|
@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
|
|||
lshw
|
||||
pciutils
|
||||
usbutils
|
||||
vulkan-tools
|
||||
powertop
|
||||
];
|
||||
}
|
||||
|
|
33
development/default.nix
Normal file → Executable file
33
development/default.nix
Normal file → Executable file
|
@ -15,14 +15,45 @@ gcc11Stdenv.mkDerivation rec {
|
|||
jetbrains.idea-community
|
||||
scala_3
|
||||
moreutils
|
||||
unzip
|
||||
hotspot
|
||||
cmakeWithGui
|
||||
gnumake
|
||||
clang
|
||||
ccache
|
||||
cudatoolkit_11
|
||||
git
|
||||
python3
|
||||
linuxPackages.perf
|
||||
sbt
|
||||
cudaPackages.cudnn
|
||||
(writeShellScriptBin "patch-cuda" "patchelf --set-rpath '/run/opengl-driver/lib:'$(patchelf --print-rpath $@) $@")
|
||||
pkg-config
|
||||
rustc
|
||||
rustfmt
|
||||
rust-analyzer
|
||||
cargo
|
||||
llvmPackages.bintools
|
||||
alsa-lib
|
||||
atk
|
||||
cairo
|
||||
dbus
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
pango
|
||||
pkg-config
|
||||
jetbrains.rust-rover
|
||||
imgui
|
||||
qt6.full
|
||||
qtcreator
|
||||
nlohmann_json
|
||||
# qtwayland
|
||||
] ;
|
||||
shellHook = ''export CXXFLAGS="-march=native -O3"'';
|
||||
shellHook = ''
|
||||
export CXXFLAGS="-march=native -O3"
|
||||
export PATH=$PATH:/run/current-system/sw/bin
|
||||
export LD_LIBRARY_PATH=${pkgs.libGL}/lib:${pkgs.libGLU}/lib:${pkgs.freeglut}/lib:${pkgs.xorg.libX11}/lib:${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.cudatoolkit_11}/lib:${pkgs.cudaPackages.cudnn}/lib:${pkgs.cudatoolkit_11.lib}/lib:$LD_LIBRARY_PATH
|
||||
# export LD_DEBUG=libs
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/env cached-nix-shell
|
||||
#! /usr/bin/env 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
|
||||
|
@ -25,7 +25,7 @@ cwd = shlex.quote(os.getcwd())
|
|||
cmd = 'cd ' + cwd + ' && cmake ' + ' '.join(args)
|
||||
|
||||
os.chdir(scriptDir)
|
||||
os.execvp("cached-nix-shell", [
|
||||
os.execvp("nix-shell", [
|
||||
'nix-shell',
|
||||
'--pure',
|
||||
'--run', cmd
|
||||
|
|
23
python/default.nix
Normal file
23
python/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
# nanomsg-py = ...build expression for this python library...;
|
||||
in pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
python3
|
||||
python3.pkgs.requests
|
||||
piper-tts
|
||||
libopus
|
||||
python3.pkgs.pip
|
||||
# pkgs.python3.pkgs.simplemediawiki
|
||||
# nanomsg-py
|
||||
];
|
||||
shellHook = ''
|
||||
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
|
||||
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
|
||||
export PIP_PREFIX=$(pwd)/_build/pip_packages
|
||||
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
|
||||
export PATH="$PIP_PREFIX/bin:$PATH"
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
}
|
||||
|
44
rust/default.nix
Normal file
44
rust/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [
|
||||
clang
|
||||
# Replace llvmPackages with llvmPackages_X, where X is the latest LLVM version (at the time of writing, 16)
|
||||
llvmPackages.bintools
|
||||
rustup
|
||||
alsa-lib
|
||||
atk
|
||||
cairo
|
||||
dbus
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
pango
|
||||
pkg-config
|
||||
];
|
||||
RUSTC_VERSION = pkgs.lib.readFile ./rust-toolchain;
|
||||
# https://github.com/rust-lang/rust-bindgen#environment-variables
|
||||
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
|
||||
shellHook = ''
|
||||
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
|
||||
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
|
||||
'';
|
||||
# Add precompiled library to rustc search path
|
||||
RUSTFLAGS = (builtins.map (a: ''-L ${a}/lib'') [
|
||||
# add libraries here (e.g. pkgs.libvmi)
|
||||
]);
|
||||
# Add glibc, clang, glib and other headers to bindgen search path
|
||||
BINDGEN_EXTRA_CLANG_ARGS =
|
||||
# Includes with normal include path
|
||||
(builtins.map (a: ''-I"${a}/include"'') [
|
||||
# add dev libraries here (e.g. pkgs.libvmi.dev)
|
||||
pkgs.glibc.dev
|
||||
])
|
||||
# Includes with special directory paths
|
||||
++ [
|
||||
''-I"${pkgs.llvmPackages_latest.libclang.lib}/lib/clang/${pkgs.llvmPackages_latest.libclang.version}/include"''
|
||||
''-I"${pkgs.glib.dev}/include/glib-2.0"''
|
||||
''-I${pkgs.glib.out}/lib/glib-2.0/include/''
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
}
|
1
rust/rust-toolchain
Normal file
1
rust/rust-toolchain
Normal file
|
@ -0,0 +1 @@
|
|||
nightly-2024-02-21
|
Loading…
Reference in a new issue