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": {
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1784494590,
|
||||
@ -34,24 +16,8 @@
|
||||
"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": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
|
||||
41
flake.nix
41
flake.nix
@ -3,7 +3,6 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@ -11,17 +10,12 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
{
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
rust-overlay,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
let
|
||||
systems = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
@ -29,26 +23,24 @@
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
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
|
||||
{
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-tree);
|
||||
|
||||
# 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: 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
|
||||
# Provides a script that copies required files to ~/
|
||||
default =
|
||||
@ -79,7 +71,6 @@
|
||||
mkdir -p $out/bin
|
||||
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
||||
'';
|
||||
|
||||
in
|
||||
pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [
|
||||
@ -95,7 +86,6 @@
|
||||
# with FSTOOLS_IN_PODMAN=1 these are not needed
|
||||
# without it, the installer fails to link FUSE somehow
|
||||
#fuse
|
||||
#rust-bin
|
||||
qemu_kvm
|
||||
];
|
||||
|
||||
@ -157,12 +147,13 @@
|
||||
xdg-utils
|
||||
xxd
|
||||
zip
|
||||
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||
]
|
||||
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||
pkgs.syslinux
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
rust-bin
|
||||
(pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
||||
fuse # fuser
|
||||
libpng # netsurf
|
||||
fontconfig # orbutils
|
||||
@ -180,8 +171,6 @@
|
||||
:${libpng.dev}/lib/pkgconfig"
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user