new streams

This commit is contained in:
Jana Dönszelmann 2026-02-24 12:41:00 +01:00
parent 3963fc50c3
commit c73be7166f
No known key found for this signature in database
13 changed files with 748 additions and 174 deletions

77
flake.nix Normal file
View file

@ -0,0 +1,77 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
# for building rust packages
naersk.url = "github:nix-community/naersk";
# for eary pre-built toolchains
nixpkgs-mozilla = {
url = "github:mozilla/nixpkgs-mozilla";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
nixpkgs-mozilla,
naersk,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = (import nixpkgs) {
inherit system;
overlays = [
(import nixpkgs-mozilla)
];
};
toolchain = (
(pkgs.rustChannelOf {
rustToolchain = ./rust-toolchain.toml;
sha256 = "sha256-sqSWJDUxc+zaz1nBWMAJKTAGBuGWP25GCftIOlCEAtA=";
}).rust.override
{
extensions = [
"rust-src"
];
}
);
in
{
packages = {
backend = pkgs.callPackage ./packages/rawr-backend.nix {
inherit naersk toolchain;
};
};
devShells.default =
with pkgs;
mkShell {
nativeBuildInputs = [
openssl
];
buildInputs = [
pkg-config
clang
llvmPackages_latest.bintools
toolchain
];
packages = [
gdb
];
shellHook = ''
export LIBCLANG_PATH="${lib.makeLibraryPath [ llvmPackages_latest.libclang.lib ]}"
export LD_LIBRARY_PATH="'$LD_LIBRARY_PATH:${
lib.makeLibraryPath [
openssl
]
}"
PKG_CONFIG_PATH="${openssl.dev}/lib/pkgconfig";
'';
};
}
);
}