Make it work with flake.nix

This commit is contained in:
2026-07-08 14:52:12 +01:00
parent 10287e1750
commit 8c437d2639
12 changed files with 894 additions and 782 deletions
+45
View File
@@ -0,0 +1,45 @@
{
description = "crib development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
static = pkgs.pkgsStatic;
in {
devShells.${system}.default = static.mkShell {
packages = [
pkgs.ccache
pkgs.gnumake
pkgs.bear
pkgs.ruby
pkgs.pkg-config
pkgs.xxd
pkgs.gdb
pkgs.binutils
static.pcre2
];
shellHook = ''
export PKG_CONFIG_PATH="${static.pcre2.dev}/lib/pkgconfig:$PKG_CONFIG_PATH"
echo "crib static musl dev shell"
export CC=x86_64-unknown-linux-musl-gcc
export CXX=x86_64-unknown-linux-musl-g++
export AR=x86_64-unknown-linux-musl-ar
'';
};
};
}