new streams
This commit is contained in:
parent
3963fc50c3
commit
c73be7166f
13 changed files with 748 additions and 174 deletions
77
flake.nix
Normal file
77
flake.nix
Normal 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";
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue