Update flake nix

This commit is contained in:
Wildan M 2025-11-25 06:27:53 -08:00
parent fb9d5bfbe1
commit 63694cf409
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
2 changed files with 25 additions and 87 deletions

24
flake.lock generated
View File

@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1743550720, "lastModified": 1763759067,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1739863612, "lastModified": 1763934636,
"narHash": "sha256-UbtgxplOhFcyjBcNbTVO8+HUHAl/WXFDOb6LvqShiZo=", "narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "632f04521e847173c54fa72973ec6c39a371211c", "rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,11 +36,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1743296961, "lastModified": 1761765539,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -63,11 +63,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739932111, "lastModified": 1764038373,
"narHash": "sha256-WkayjH0vuGw0hx2gmjTUGFRvMKpM17gKcpL/U8EUUw0=", "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "75b2271c5c087d830684cd5462d4410219acc367", "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -6,9 +6,7 @@
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
inputs = { inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.follows = "nixpkgs";
};
}; };
}; };
@ -47,7 +45,7 @@
overlays = [ rust-overlay.overlays.default ]; overlays = [ rust-overlay.overlays.default ];
}; };
rust-bin = pkgs.rust-bin.nightly."2025-01-12".default.override { rust-bin = pkgs.rust-bin.nightly."2025-10-03".default.override {
extensions = [ extensions = [
"rust-analyzer" "rust-analyzer"
"rust-src" "rust-src"
@ -71,19 +69,6 @@
rustc = rust-bin; rustc = rust-bin;
}; };
cargo-config = rustPlatform.buildRustPackage {
pname = "cargo-config";
version = "0.1.1";
src = pkgs.fetchFromGitHub {
owner = "wesleywiser";
repo = "cargo-config";
rev = "cf576faf65913615ed424914daa960800ed3ebc4";
sha256 = "sha256-HrITNTfjBppOH1MhfZHfzHc6N8ymcm7vaiBI94ctUOA=";
fetchSubmodules = true;
};
# useFetchCargoVendor = true; # this is recommended, but fails in some python code?
cargoHash = "sha256-yQpIKclZ8KLE5JGkB/tjKZA8ezaD9SbUthDsuBXYZjQ=";
};
podmanSetupScript = podmanSetupScript =
let let
registriesConf = pkgs.writeText "registries.conf" '' registriesConf = pkgs.writeText "registries.conf" ''
@ -106,7 +91,7 @@
export PODMAN_SYSTEMD_UNIT=podman.socket export PODMAN_SYSTEMD_UNIT=podman.socket
''; '';
# Provides a fake "docker" binary mapping to podman # Provides a fake "docker" binary mapping to podman
dockerCompat = pkgs.runCommandNoCC "docker-podman-compat" { } '' dockerCompat = pkgs.runCommand "docker-podman-compat" { } ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${pkgs.podman}/bin/podman $out/bin/docker ln -s ${pkgs.podman}/bin/podman $out/bin/docker
''; '';
@ -114,13 +99,6 @@
in in
pkgs.mkShell rec { pkgs.mkShell rec {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# Compilation
rust-bin
# Utils
cowsay
lolcat
# Podman # Podman
dockerCompat dockerCompat
podman # Docker compat podman # Docker compat
@ -130,65 +108,24 @@
slirp4netns # User-mode networking for unprivileged namespaces slirp4netns # User-mode networking for unprivileged namespaces
fuse-overlayfs # CoW for images, much faster than default vfs fuse-overlayfs # CoW for images, much faster than default vfs
# Cargo utilities # with FSTOOLS_IN_PODMAN=1 these are not needed
cargo-config # without it, the installer fails to link FUSE somehow
#fuse
# Build Redox #rust-bin
ant
autoconf
automake
bison
cmake
curl
doxygen
expat
expect
file
flex
fuse
gmp
gnumake
gnupatch
gperf
just
libjpeg
libpng
libtool
llvmPackages.clang
llvmPackages.llvm
lua
m4
meson
nasm
perl
perl540Packages.HTMLParser
perl540Packages.Po4a
pkgconf
podman
protobuf
(python3.withPackages (ps: with ps; [ mako ]))
qemu_kvm qemu_kvm
rust-cbindgen
scons
SDL
syslinux
texinfo
unzip
waf
wget
xdg-utils
zip
]; ];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
NIX_SHELL_BUILD = "1"; NIX_SHELL_BUILD = "1";
FSTOOLS_IN_PODMAN = "1";
shellHook = '' shellHook = ''
# Install required configuration # Install required configuration
${podmanSetupScript} ${podmanSetupScript}
echo "Redox environment loaded" | cowsay | lolcat echo "Redox podman build environment loaded"
''; '';
}; };
#TODO: This isn't tested yet, use at your own risk
native = pkgs.mkShell rec { native = pkgs.mkShell rec {
nativeBuildInputs = nativeBuildInputs =
let let
@ -228,7 +165,6 @@
qemu_kvm qemu_kvm
rust-cbindgen rust-cbindgen
scons scons
syslinux
texinfo texinfo
unzip unzip
waf waf
@ -236,6 +172,8 @@
xdg-utils xdg-utils
xxd xxd
zip zip
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
pkgs.syslinux
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
@ -254,7 +192,7 @@
PODMAN_BUILD = "0"; PODMAN_BUILD = "0";
shellHook = with pkgs; '' shellHook = with pkgs; ''
export PKG_CONFIG_PATH="${fuse.dev}/lib/pkgconfig\ export PKG_CONFIG_PATH="${fuse.dev}/lib/pkgconfig\
:${libpng.dev}/lib/pkgconfig :${libpng.dev}/lib/pkgconfig"
''; '';
}; };
}; };