mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-23 08:40: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
|
||||
, stdenv
|
||||
, pkg-config
|
||||
, openssl
|
||||
{
|
||||
rustPlatform,
|
||||
lib,
|
||||
stdenv,
|
||||
pkg-config,
|
||||
openssl,
|
||||
|
||||
, enableCodeforces ? false
|
||||
, enableOsu ? true
|
||||
, ...
|
||||
enableCodeforces ? false,
|
||||
enableOsu ? true,
|
||||
...
|
||||
}:
|
||||
let
|
||||
customizeFeatures = !(enableCodeforces && enableOsu);
|
||||
|
@ -15,7 +16,10 @@ rustPlatform.buildRustPackage {
|
|||
pname = "youmubot";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./.;
|
||||
src = lib.cleanSourceWith {
|
||||
filter = name: type: !(type == "directory" && (baseNameOf (toString name)) == ".github");
|
||||
src = lib.cleanSource ./.;
|
||||
};
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
|
@ -28,9 +32,7 @@ rustPlatform.buildRustPackage {
|
|||
|
||||
buildNoDefaultFeatures = customizeFeatures;
|
||||
buildFeatures = lib.optionals customizeFeatures (
|
||||
[ "core" ]
|
||||
++ lib.optional enableCodeforces "codeforces"
|
||||
++ lib.optional enableOsu "osu"
|
||||
[ "core" ] ++ lib.optional enableCodeforces "codeforces" ++ lib.optional enableOsu "osu"
|
||||
);
|
||||
|
||||
cargoBuildFlags = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue