Skip to content

Commit

Permalink
build(nix): do not include examples dir (#19)
Browse files Browse the repository at this point in the history
* build(nix): do not include examples dir

* chore(nix): various cleanup
  • Loading branch information
isabelroses authored Jun 14, 2024
1 parent dfc700e commit 9fe7878
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
9 changes: 5 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{ lib, rustPlatform }:
let
toml = (lib.importTOML ./Cargo.toml).package;
in
rustPlatform.buildRustPackage {
pname = "catppuccin-whiskers";
inherit ((lib.importTOML ./Cargo.toml).package) version;
inherit (toml) version;

src = lib.fileset.toSource {
root = ./.;
Expand All @@ -11,7 +14,6 @@ rustPlatform.buildRustPackage {
./Cargo.lock
./src
./tests
./examples
./LICENSE
]
);
Expand All @@ -20,8 +22,7 @@ rustPlatform.buildRustPackage {
cargoLock.lockFile = ./Cargo.lock;

meta = {
homepage = "https://github.com/catppuccin/whiskers";
description = "😾 Soothing port creation tool for the high-spirited!";
inherit (toml) homepage description;
license = lib.licenses.mit;
mainProgram = "whiskers";
};
Expand Down
16 changes: 7 additions & 9 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{ callPackage, toolchain }:
let
mainPkg = callPackage ./default.nix { };
toolchainWithComponents = (
toolchain.stable.latest.default.override {
extensions = [
"rustfmt"
"rust-analyzer"
"clippy"
];
}
);
toolchainWithComponents = toolchain.stable.latest.default.override {
extensions = [
"rustfmt"
"rust-analyzer"
"clippy"
];
};
in
mainPkg.overrideAttrs (oa: {
nativeBuildInputs = [ toolchainWithComponents ] ++ (oa.nativeBuildInputs or [ ]);
Expand Down

0 comments on commit 9fe7878

Please sign in to comment.