mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-23 16:50:49 +00:00
nix: clean source in input
This commit is contained in:
parent
97e1fb3339
commit
cdd85dae71
1 changed files with 14 additions and 12 deletions
26
package.nix
26
package.nix
|
@ -1,12 +1,13 @@
|
||||||
{ rustPlatform
|
{
|
||||||
, lib
|
rustPlatform,
|
||||||
, stdenv
|
lib,
|
||||||
, pkg-config
|
stdenv,
|
||||||
, openssl
|
pkg-config,
|
||||||
|
openssl,
|
||||||
|
|
||||||
, enableCodeforces ? false
|
enableCodeforces ? false,
|
||||||
, enableOsu ? true
|
enableOsu ? true,
|
||||||
, ...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
customizeFeatures = !(enableCodeforces && enableOsu);
|
customizeFeatures = !(enableCodeforces && enableOsu);
|
||||||
|
@ -15,7 +16,10 @@ rustPlatform.buildRustPackage {
|
||||||
pname = "youmubot";
|
pname = "youmubot";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
src = ./.;
|
src = lib.cleanSourceWith {
|
||||||
|
filter = name: type: !(type == "directory" && (baseNameOf (toString name)) == ".github");
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
};
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ./Cargo.lock;
|
lockFile = ./Cargo.lock;
|
||||||
outputHashes = {
|
outputHashes = {
|
||||||
|
@ -28,9 +32,7 @@ rustPlatform.buildRustPackage {
|
||||||
|
|
||||||
buildNoDefaultFeatures = customizeFeatures;
|
buildNoDefaultFeatures = customizeFeatures;
|
||||||
buildFeatures = lib.optionals customizeFeatures (
|
buildFeatures = lib.optionals customizeFeatures (
|
||||||
[ "core" ]
|
[ "core" ] ++ lib.optional enableCodeforces "codeforces" ++ lib.optional enableOsu "osu"
|
||||||
++ lib.optional enableCodeforces "codeforces"
|
|
||||||
++ lib.optional enableOsu "osu"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
cargoBuildFlags = [
|
cargoBuildFlags = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue