summaryrefslogtreecommitdiff
path: root/pkgs/treefetch.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-17 19:37:35 -0400
committerseth <[email protected]>2023-04-17 19:37:35 -0400
commit76817703bb1cf925e6f99a2ba8ad78d2ec560b6e (patch)
treedae7d85267d6cf6d52440d5376b151b80edbee17 /pkgs/treefetch.nix
parent5c5cb3b928ab4a4bd5fd3886fb40cb109d713347 (diff)
feat(flake)!: use less inputs
Diffstat (limited to 'pkgs/treefetch.nix')
-rw-r--r--pkgs/treefetch.nix40
1 files changed, 21 insertions, 19 deletions
diff --git a/pkgs/treefetch.nix b/pkgs/treefetch.nix
index 247354d..35545ac 100644
--- a/pkgs/treefetch.nix
+++ b/pkgs/treefetch.nix
@@ -1,30 +1,32 @@
{
lib,
- callPackage,
fetchFromGitHub,
- naersk,
+ rustPlatform,
}: let
commit = "02f65e11e1f23d5fa9e66335eb5ff4f2f6b01400";
- package = (callPackage naersk {}).buildPackage {
+ inherit (rustPlatform) buildRustPackage;
+ inherit (lib) licenses maintainers platforms;
+ inherit (builtins) substring;
+in
+ buildRustPackage rec {
+ pname = "treefetch";
+ version = substring 0 7 commit;
+
src = fetchFromGitHub {
owner = "angelofallars";
repo = "treefetch";
rev = commit;
sha256 = "sha256-FDiulTit492KwV46A3qwjHQwzpjVJvIXTfTrMufXd5k=";
};
- };
-in
- with lib;
- package
- // {
- meta =
- package.meta
- // {
- description = "A plant-based system fetch tool made with Rust.";
- longDescription = "A comfy and fast system fetch tool made in Rust. Tested to be much faster than neofetch and pfetch.";
- homepage = "https://github.com/angelofallars/treefetch";
- license = licenses.gpl3;
- maintainers = with maintainers; [getchoo];
- platforms = platforms.all;
- };
- }
+
+ cargoLock.lockFile = "${src}/Cargo.lock";
+
+ meta = {
+ description = "A plant-based system fetch tool made with Rust.";
+ longDescription = "A comfy and fast system fetch tool made in Rust. Tested to be much faster than neofetch and pfetch.";
+ homepage = "https://github.com/angelofallars/treefetch";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [getchoo];
+ platforms = platforms.unix;
+ };
+ }