Skip to content
Snippets Groups Projects
Commit 70775ce5 authored by vector1dev -'s avatar vector1dev -
Browse files

nix: basic flake for building Redox with Nix

parent 1f49ccae
No related branches found
No related tags found
No related merge requests found
Pipeline #13887 failed
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1704420045,
"narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1681358109,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1704593904,
"narHash": "sha256-nDoXZDTRdgF3b4n3m011y99nYFewvOl9UpzFvP8Rb3c=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "c36fd70a99decfa6e110c86f296a97613034a680",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
{
description = "Redox";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = inputs @ {
nixpkgs,
rust-overlay,
...
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
nixpkgsFor = system:
import nixpkgs {
inherit system;
overlays = [
(import rust-overlay)
];
};
in {
devShells = forAllSystems (system: let
pkgs = nixpkgsFor system;
in rec {
default = redox;
redox = pkgs.mkShell {
NIX_SHELL_BUILD = "1";
shellHook = '''';
buildInputs = with pkgs; [
cmake
fuse
gperf
perl
perl538Packages.HTMLParser
perl538Packages.Po4a
nasm
wget
texinfo
bison
flex
autoconf
automake
curl
file
gnupatch
gnumake
scons
waf
expat
gmp
libtool
libpng
libjpeg
SDL
m4
pkgconf
syslinux
meson
(python3.withPackages (ps: with ps; [mako]))
xdg-utils
zip
unzip
doxygen
lua
ant
protobuf
llvmPackages_17.clang
llvmPackages_17.llvm
qemu_kvm
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
];
};
});
};
}
# Dependencies
# Don't check for Rust/Cargo if you will be using Nix
ifneq ($(NIX_SHELL_BUILD),1)
# Don't check for Rust/Cargo if you will be using Podman
ifneq ($(PODMAN_BUILD),1)
......@@ -26,3 +29,4 @@ $(error just $(JUST_VERSION) not found, run "cargo install --force --version $(J
endif
endif
endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment