mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
fix: nix flake
This commit is contained in:
4
.github/workflows/nix.yml
vendored
4
.github/workflows/nix.yml
vendored
@@ -29,10 +29,10 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@v16
|
uses: DeterminateSystems/nix-installer-action@v22
|
||||||
|
|
||||||
- name: Magic Nix Cache
|
- name: Magic Nix Cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@v9
|
uses: DeterminateSystems/magic-nix-cache-action@v14
|
||||||
|
|
||||||
- name: Check flake formatting and evaluation
|
- name: Check flake formatting and evaluation
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
|||||||
61
flake.lock
generated
61
flake.lock
generated
@@ -1,27 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"fenix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"naersk",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1752475459,
|
|
||||||
"narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "fenix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -56,27 +34,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"naersk": {
|
|
||||||
"inputs": {
|
|
||||||
"fenix": "fenix",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1780932914,
|
|
||||||
"narHash": "sha256-3TJ7skmzAeBRkOihfHSWye7Fkuc1gP01dwa/EX1EA/E=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "naersk",
|
|
||||||
"rev": "10d02d63fa3f296786d27f3a35a9926ee3fa6df0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "naersk",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780749050,
|
"lastModified": 1780749050,
|
||||||
@@ -112,26 +69,8 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"naersk": "naersk",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"rust-analyzer-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1752428706,
|
|
||||||
"narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=",
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"rev": "591e3b7624be97e4443ea7b5542c191311aa141d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "rust-lang",
|
|
||||||
"ref": "nightly",
|
|
||||||
"repo": "rust-analyzer",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
33
flake.nix
33
flake.nix
@@ -9,18 +9,12 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
naersk = {
|
|
||||||
url = "github:nix-community/naersk";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
self.submodules = true;
|
self.submodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
inputs@{
|
||||||
flake-parts,
|
flake-parts,
|
||||||
naersk,
|
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@@ -34,22 +28,34 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
naersk' = pkgs.callPackage naersk { };
|
|
||||||
|
|
||||||
manifest = (lib.importTOML ./crates/pumpkin/Cargo.toml).package;
|
manifest = (lib.importTOML ./crates/pumpkin/Cargo.toml).package;
|
||||||
workspace-manifest = (lib.importTOML ./Cargo.toml).workspace.package;
|
workspace-manifest = (lib.importTOML ./Cargo.toml).workspace.package;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.default = naersk'.buildPackage {
|
packages.default = pkgs.rustPlatform.buildRustPackage {
|
||||||
pname = manifest.name;
|
pname = manifest.name;
|
||||||
inherit (workspace-manifest) version;
|
inherit (workspace-manifest) version;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.rustfmt ];
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
src = lib.fileset.toSource {
|
cargoLock = {
|
||||||
root = ./.;
|
lockFile = ./Cargo.lock;
|
||||||
fileset = lib.fileset.gitTracked ./.;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgs.rustfmt
|
||||||
|
pkgs.pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
cargoBuildFlags = [
|
||||||
|
"--package"
|
||||||
|
"pumpkin"
|
||||||
|
];
|
||||||
|
|
||||||
|
CARGO_PROFILE_RELEASE_LTO = "thin";
|
||||||
|
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "16";
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
@@ -59,6 +65,7 @@
|
|||||||
rust-analyzer
|
rust-analyzer
|
||||||
rustc
|
rustc
|
||||||
rustfmt
|
rustfmt
|
||||||
|
pkg-config
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user