mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-04 19:56:36 +08:00
nix: Drop flake-parts
This commit is contained in:
parent
d48b58a9a2
commit
ce274844fd
34
flake.lock
generated
34
flake.lock
generated
@ -1,23 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1782949081,
|
|
||||||
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1784494590,
|
"lastModified": 1784494590,
|
||||||
@ -34,24 +16,8 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1782614948,
|
|
||||||
"narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
}
|
}
|
||||||
|
|||||||
41
flake.nix
41
flake.nix
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
||||||
rust-overlay = {
|
rust-overlay = {
|
||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -11,17 +10,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-parts,
|
|
||||||
rust-overlay,
|
rust-overlay,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
let
|
||||||
{
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
systems = [
|
systems = [
|
||||||
"i686-linux"
|
"i686-linux"
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
@ -29,26 +23,24 @@
|
|||||||
"x86_64-darwin"
|
"x86_64-darwin"
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
perSystem =
|
|
||||||
{
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
|
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
|
|
||||||
|
pkgsFor =
|
||||||
|
system:
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
};
|
};
|
||||||
rust-bin = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
||||||
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f (pkgsFor system));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
formatter = pkgs.nixfmt-rfc-style;
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-tree);
|
||||||
|
|
||||||
# TODO: Create Redox OS Image as package
|
# TODO: Create Redox OS Image as package
|
||||||
# TODO: No cross-compile for now, as there is no pkgsCross.aarch64-unknown-redox and so on
|
# TODO: No cross-compile for now, as there is no pkgsCross.aarch64-unknown-redox and so on
|
||||||
# TODO: Get rid of make env step: package custom libtool and setup rust toolchain properly
|
# TODO: Get rid of make env step: package custom libtool and setup rust toolchain properly
|
||||||
devShells = {
|
devShells = forAllSystems (pkgs: {
|
||||||
# Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
|
# Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
|
||||||
# Provides a script that copies required files to ~/
|
# Provides a script that copies required files to ~/
|
||||||
default =
|
default =
|
||||||
@ -79,7 +71,6 @@
|
|||||||
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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
pkgs.mkShell rec {
|
pkgs.mkShell rec {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
@ -95,7 +86,6 @@
|
|||||||
# with FSTOOLS_IN_PODMAN=1 these are not needed
|
# with FSTOOLS_IN_PODMAN=1 these are not needed
|
||||||
# without it, the installer fails to link FUSE somehow
|
# without it, the installer fails to link FUSE somehow
|
||||||
#fuse
|
#fuse
|
||||||
#rust-bin
|
|
||||||
qemu_kvm
|
qemu_kvm
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -157,12 +147,13 @@
|
|||||||
xdg-utils
|
xdg-utils
|
||||||
xxd
|
xxd
|
||||||
zip
|
zip
|
||||||
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
|
]
|
||||||
|
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||||
pkgs.syslinux
|
pkgs.syslinux
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
rust-bin
|
(pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
||||||
fuse # fuser
|
fuse # fuser
|
||||||
libpng # netsurf
|
libpng # netsurf
|
||||||
fontconfig # orbutils
|
fontconfig # orbutils
|
||||||
@ -180,8 +171,6 @@
|
|||||||
:${libpng.dev}/lib/pkgconfig"
|
:${libpng.dev}/lib/pkgconfig"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user