File tree Expand file tree Collapse file tree 3 files changed +133
-0
lines changed
Expand file tree Collapse file tree 3 files changed +133
-0
lines changed Original file line number Diff line number Diff line change 1515* .iml
1616# ## macOS ###
1717.DS_Store
18+
19+ # ## direnv ###
20+ /.direnv /
Original file line number Diff line number Diff line change 1+ {
2+ inputs = {
3+ nixpkgs . url = "github:nixos/nixpkgs" ;
4+ flake-utils . url = "github:numtide/flake-utils" ;
5+ } ;
6+
7+ outputs = {
8+ self ,
9+ nixpkgs ,
10+ flake-utils ,
11+ } :
12+ flake-utils . lib . eachDefaultSystem ( system : let
13+ pkgs = nixpkgs . legacyPackages . ${ system } ;
14+ libselinuxPath = with pkgs ;
15+ lib . makeLibraryPath [
16+ libselinux
17+ ] ;
18+ libaclPath = with pkgs ;
19+ lib . makeLibraryPath [
20+ acl
21+ ] ;
22+
23+ build_deps = with pkgs ; [
24+ clang
25+ llvmPackages . bintools
26+ rustup
27+
28+ pre-commit
29+
30+ # debugging
31+ gdb
32+ ] ;
33+ gnu_testing_deps = with pkgs ; [
34+ autoconf
35+ automake
36+ bison
37+ gnum4
38+ gperf
39+ gettext
40+ texinfo
41+ ] ;
42+ in {
43+ devShell = pkgs . mkShell {
44+ buildInputs = build_deps ++ gnu_testing_deps ;
45+
46+ RUSTC_VERSION = "1.75" ;
47+ LIBCLANG_PATH = pkgs . lib . makeLibraryPath [ pkgs . llvmPackages_latest . libclang . lib ] ;
48+ shellHook = ''
49+ export PATH=$PATH:'' ${CARGO_HOME:-~/.cargo}/bin
50+ export PATH=$PATH:'' ${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
51+ '' ;
52+
53+ SELINUX_INCLUDE_DIR = ''${ pkgs . libselinux . dev } /include'' ;
54+ SELINUX_LIB_DIR = libselinuxPath ;
55+ SELINUX_STATIC = "0" ;
56+
57+ # Necessary to build GNU.
58+ LDFLAGS = ''-L ${ libselinuxPath } -L ${ libaclPath } '' ;
59+
60+ # Add precompiled library to rustc search path
61+ RUSTFLAGS =
62+ ( builtins . map ( a : ''-L ${ a } /lib'' ) [
63+ ] )
64+ ++ [
65+ ''-L ${ libselinuxPath } ''
66+ ''-L ${ libaclPath } ''
67+ ] ;
68+ } ;
69+ } ) ;
70+ }
You can’t perform that action at this time.
0 commit comments