From 2a936b25d71986b1044645179b2fa385f43c2bc2 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 22 May 2024 04:06:24 -0400 Subject: treewide: enforce /package.nix --- overlay.nix | 12 ++++---- pkgs/check-pr.nix | 13 --------- pkgs/check-pr/package.nix | 13 +++++++++ pkgs/clang-tidy-sarif.nix | 36 ----------------------- pkgs/clang-tidy-sarif/package.nix | 36 +++++++++++++++++++++++ pkgs/clippy-sarif.nix | 38 ------------------------ pkgs/clippy-sarif/package.nix | 38 ++++++++++++++++++++++++ pkgs/flat-manager-client.nix | 41 -------------------------- pkgs/flat-manager-client/package.nix | 41 ++++++++++++++++++++++++++ pkgs/flat-manager.nix | 41 -------------------------- pkgs/flat-manager/package.nix | 41 ++++++++++++++++++++++++++ pkgs/hadolint-sarif.nix | 36 ----------------------- pkgs/hadolint-sarif/package.nix | 36 +++++++++++++++++++++++ pkgs/nixgc.nix | 25 ---------------- pkgs/nixgc/package.nix | 25 ++++++++++++++++ pkgs/sarif-fmt.nix | 56 ------------------------------------ pkgs/sarif-fmt/package.nix | 56 ++++++++++++++++++++++++++++++++++++ pkgs/treefetch.nix | 27 ----------------- pkgs/treefetch/package.nix | 27 +++++++++++++++++ 19 files changed, 319 insertions(+), 319 deletions(-) delete mode 100644 pkgs/check-pr.nix create mode 100644 pkgs/check-pr/package.nix delete mode 100644 pkgs/clang-tidy-sarif.nix create mode 100644 pkgs/clang-tidy-sarif/package.nix delete mode 100644 pkgs/clippy-sarif.nix create mode 100644 pkgs/clippy-sarif/package.nix delete mode 100644 pkgs/flat-manager-client.nix create mode 100644 pkgs/flat-manager-client/package.nix delete mode 100644 pkgs/flat-manager.nix create mode 100644 pkgs/flat-manager/package.nix delete mode 100644 pkgs/hadolint-sarif.nix create mode 100644 pkgs/hadolint-sarif/package.nix delete mode 100644 pkgs/nixgc.nix create mode 100644 pkgs/nixgc/package.nix delete mode 100644 pkgs/sarif-fmt.nix create mode 100644 pkgs/sarif-fmt/package.nix delete mode 100644 pkgs/treefetch.nix create mode 100644 pkgs/treefetch/package.nix diff --git a/overlay.nix b/overlay.nix index 9a796aa..2d2c2b2 100644 --- a/overlay.nix +++ b/overlay.nix @@ -6,13 +6,13 @@ in directory = ./pkgs; } // { - clang-tidy-sarif = callPackage ./pkgs/clang-tidy-sarif.nix {inherit (final) clang-tidy-sarif;}; - clippy-sarif = callPackage ./pkgs/clippy-sarif.nix {inherit (final) clippy-sarif;}; - hadolint-sarif = callPackage ./pkgs/hadolint-sarif.nix {inherit (final) hadolint-sarif;}; - sarif-fmt = callPackage ./pkgs/sarif-fmt.nix {inherit (final) sarif-fmt;}; + clang-tidy-sarif = callPackage ./pkgs/clang-tidy-sarif/package.nix {inherit (final) clang-tidy-sarif;}; + clippy-sarif = callPackage ./pkgs/clippy-sarif/package.nix {inherit (final) clippy-sarif;}; + hadolint-sarif = callPackage ./pkgs/hadolint-sarif/package.nix {inherit (final) hadolint-sarif;}; + sarif-fmt = callPackage ./pkgs/sarif-fmt/package.nix {inherit (final) sarif-fmt;}; - flat-manager = callPackage ./pkgs/flat-manager.nix {inherit (final) flat-manager;}; - flat-manager-client = callPackage ./pkgs/flat-manager-client.nix {inherit (final) flat-manager;}; + flat-manager = callPackage ./pkgs/flat-manager/package.nix {inherit (final) flat-manager;}; + flat-manager-client = callPackage ./pkgs/flat-manager-client/package.nix {inherit (final) flat-manager;}; papa = callPackage ./pkgs/papa/package.nix {inherit (final) papa;}; } diff --git a/pkgs/check-pr.nix b/pkgs/check-pr.nix deleted file mode 100644 index fca30b1..0000000 --- a/pkgs/check-pr.nix +++ /dev/null @@ -1,13 +0,0 @@ -{writeShellApplication}: -writeShellApplication { - name = "check-pr"; - text = '' - _usage=" - usage: check-pr [package] - " - - [ "$#" -lt 2 ] && echo -n "$_usage" && exit 1 - - nix run "github:$1?ref=pull/$2/head''${3:+#$3}" - ''; -} diff --git a/pkgs/check-pr/package.nix b/pkgs/check-pr/package.nix new file mode 100644 index 0000000..fca30b1 --- /dev/null +++ b/pkgs/check-pr/package.nix @@ -0,0 +1,13 @@ +{writeShellApplication}: +writeShellApplication { + name = "check-pr"; + text = '' + _usage=" + usage: check-pr [package] + " + + [ "$#" -lt 2 ] && echo -n "$_usage" && exit 1 + + nix run "github:$1?ref=pull/$2/head''${3:+#$3}" + ''; +} diff --git a/pkgs/clang-tidy-sarif.nix b/pkgs/clang-tidy-sarif.nix deleted file mode 100644 index 12dfe55..0000000 --- a/pkgs/clang-tidy-sarif.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - lib, - fetchFromGitHub, - rustPlatform, - clang-tidy-sarif, - testers, -}: -rustPlatform.buildRustPackage rec { - pname = "clang-tidy-sarif"; - version = "0.4.2"; - - src = fetchFromGitHub { - owner = "psastras"; - repo = "sarif-rs"; - rev = "${pname}-v${version}"; - hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; - }; - - cargoSha256 = "sha256-NzdgfHRDgLB6sMhBflk9rACEocLP23KlZL22iAfBfh8="; - cargoBuildFlags = ["--package" pname]; - cargoTestFlags = cargoBuildFlags; - - passthru = { - tests.version = testers.testVersion { - package = clang-tidy-sarif; - }; - }; - - meta = with lib; { - mainProgram = "clang-tidy-sarif"; - description = "A CLI tool to convert clang-tidy diagnostics into SARIF"; - homepage = "https://psastras.github.io/sarif-rs"; - maintainers = with maintainers; [getchoo]; - license = licenses.mit; - }; -} diff --git a/pkgs/clang-tidy-sarif/package.nix b/pkgs/clang-tidy-sarif/package.nix new file mode 100644 index 0000000..12dfe55 --- /dev/null +++ b/pkgs/clang-tidy-sarif/package.nix @@ -0,0 +1,36 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + clang-tidy-sarif, + testers, +}: +rustPlatform.buildRustPackage rec { + pname = "clang-tidy-sarif"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "psastras"; + repo = "sarif-rs"; + rev = "${pname}-v${version}"; + hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; + }; + + cargoSha256 = "sha256-NzdgfHRDgLB6sMhBflk9rACEocLP23KlZL22iAfBfh8="; + cargoBuildFlags = ["--package" pname]; + cargoTestFlags = cargoBuildFlags; + + passthru = { + tests.version = testers.testVersion { + package = clang-tidy-sarif; + }; + }; + + meta = with lib; { + mainProgram = "clang-tidy-sarif"; + description = "A CLI tool to convert clang-tidy diagnostics into SARIF"; + homepage = "https://psastras.github.io/sarif-rs"; + maintainers = with maintainers; [getchoo]; + license = licenses.mit; + }; +} diff --git a/pkgs/clippy-sarif.nix b/pkgs/clippy-sarif.nix deleted file mode 100644 index a9fa10c..0000000 --- a/pkgs/clippy-sarif.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - lib, - fetchFromGitHub, - rustPlatform, - clippy, - clippy-sarif, - testers, -}: -rustPlatform.buildRustPackage rec { - pname = "clippy-sarif"; - version = "0.4.2"; - - src = fetchFromGitHub { - owner = "psastras"; - repo = "sarif-rs"; - rev = "${pname}-v${version}"; - hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; - }; - - cargoSha256 = "sha256-F3NrqkqLdvMRIuozCMMqwlrrf5QrnmcEhy4TGSzPhiU="; - cargoBuildFlags = ["--package" pname]; - cargoTestFlags = cargoBuildFlags; - - passthru = { - tests.version = testers.testVersion { - package = clippy-sarif; - }; - }; - - meta = with lib; { - mainProgram = "clippy-sarif"; - description = "A CLI tool to convert clippy diagnostics into SARIF"; - homepage = "https://psastras.github.io/sarif-rs"; - maintainers = with maintainers; [getchoo]; - license = licenses.mit; - inherit (clippy.meta) platforms; - }; -} diff --git a/pkgs/clippy-sarif/package.nix b/pkgs/clippy-sarif/package.nix new file mode 100644 index 0000000..a9fa10c --- /dev/null +++ b/pkgs/clippy-sarif/package.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + clippy, + clippy-sarif, + testers, +}: +rustPlatform.buildRustPackage rec { + pname = "clippy-sarif"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "psastras"; + repo = "sarif-rs"; + rev = "${pname}-v${version}"; + hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; + }; + + cargoSha256 = "sha256-F3NrqkqLdvMRIuozCMMqwlrrf5QrnmcEhy4TGSzPhiU="; + cargoBuildFlags = ["--package" pname]; + cargoTestFlags = cargoBuildFlags; + + passthru = { + tests.version = testers.testVersion { + package = clippy-sarif; + }; + }; + + meta = with lib; { + mainProgram = "clippy-sarif"; + description = "A CLI tool to convert clippy diagnostics into SARIF"; + homepage = "https://psastras.github.io/sarif-rs"; + maintainers = with maintainers; [getchoo]; + license = licenses.mit; + inherit (clippy.meta) platforms; + }; +} diff --git a/pkgs/flat-manager-client.nix b/pkgs/flat-manager-client.nix deleted file mode 100644 index f41e744..0000000 --- a/pkgs/flat-manager-client.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - lib, - stdenvNoCC, - flat-manager, - python3, - ostree, -}: -stdenvNoCC.mkDerivation (finalAttrs: { - pname = "flat-manager-client"; - inherit (flat-manager) version src; - - pythonPath = with python3.pkgs; [ - aiohttp - pygobject3 - tenacity - ]; - - nativeBuildInputs = [python3.pkgs.wrapPython]; - buildInputs = [(python3.withPackages (lib.const finalAttrs.pythonPath))]; - - installPhase = '' - runHook preInstall - install -Dm755 {,$out/bin/}flat-manager-client - runHook postInstall - ''; - - postFixup = '' - makeWrapperArgs+=( - --prefix GI_TYPELIB_PATH : ${lib.makeSearchPath "lib/girepository-1.0" [ostree]} - ) - - wrapPythonPrograms $out/bin $out "$pythonPath" - ''; - - meta = - flat-manager.meta - // { - mainProgram = "flat-manager-client"; - description = flat-manager.meta.description + " (Client)"; - }; -}) diff --git a/pkgs/flat-manager-client/package.nix b/pkgs/flat-manager-client/package.nix new file mode 100644 index 0000000..f41e744 --- /dev/null +++ b/pkgs/flat-manager-client/package.nix @@ -0,0 +1,41 @@ +{ + lib, + stdenvNoCC, + flat-manager, + python3, + ostree, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "flat-manager-client"; + inherit (flat-manager) version src; + + pythonPath = with python3.pkgs; [ + aiohttp + pygobject3 + tenacity + ]; + + nativeBuildInputs = [python3.pkgs.wrapPython]; + buildInputs = [(python3.withPackages (lib.const finalAttrs.pythonPath))]; + + installPhase = '' + runHook preInstall + install -Dm755 {,$out/bin/}flat-manager-client + runHook postInstall + ''; + + postFixup = '' + makeWrapperArgs+=( + --prefix GI_TYPELIB_PATH : ${lib.makeSearchPath "lib/girepository-1.0" [ostree]} + ) + + wrapPythonPrograms $out/bin $out "$pythonPath" + ''; + + meta = + flat-manager.meta + // { + mainProgram = "flat-manager-client"; + description = flat-manager.meta.description + " (Client)"; + }; +}) diff --git a/pkgs/flat-manager.nix b/pkgs/flat-manager.nix deleted file mode 100644 index 4326c83..0000000 --- a/pkgs/flat-manager.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - lib, - rustPlatform, - fetchFromGitHub, - flat-manager, - glib, - openssl, - ostree, - postgresql, - pkg-config, -}: -rustPlatform.buildRustPackage { - pname = "flat-manager"; - version = "unstable-2024-01-20"; - - src = fetchFromGitHub { - owner = "flatpak"; - repo = flat-manager.pname; - rev = "d1c3d36da7b5779163ff70007c4d2f145cfce664"; - hash = "sha256-Gt3c+fIC0W6+OJ4m6ujmS1nB9Nnr39oHlzxaKCxGAag="; - }; - - cargoHash = "sha256-xdJYSVH7l31/LpgS615D7kcvjxILFPMiVWDDvmm/3VE="; - - nativeBuildInputs = [pkg-config]; - buildInputs = [glib openssl ostree postgresql]; - - meta = with lib; { - mainProgram = "flat-manager"; - description = "Manager for flatpak repositories"; - longDescription = '' - flat-manager serves and maintains a Flatpak repository. You point it at an ostree - repository and it will allow Flatpak clients to install apps from the repository over HTTP. - Additionally, it has an HTTP API that lets you upload new builds and manage the repository. - ''; - homepage = "https://github.com/flatpak/flat-manager"; - changelog = "https://github.com/flatpak/flat-manager/releases/tag/${flat-manager.version}"; - maintainers = with maintainers; [getchoo]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/flat-manager/package.nix b/pkgs/flat-manager/package.nix new file mode 100644 index 0000000..4326c83 --- /dev/null +++ b/pkgs/flat-manager/package.nix @@ -0,0 +1,41 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + flat-manager, + glib, + openssl, + ostree, + postgresql, + pkg-config, +}: +rustPlatform.buildRustPackage { + pname = "flat-manager"; + version = "unstable-2024-01-20"; + + src = fetchFromGitHub { + owner = "flatpak"; + repo = flat-manager.pname; + rev = "d1c3d36da7b5779163ff70007c4d2f145cfce664"; + hash = "sha256-Gt3c+fIC0W6+OJ4m6ujmS1nB9Nnr39oHlzxaKCxGAag="; + }; + + cargoHash = "sha256-xdJYSVH7l31/LpgS615D7kcvjxILFPMiVWDDvmm/3VE="; + + nativeBuildInputs = [pkg-config]; + buildInputs = [glib openssl ostree postgresql]; + + meta = with lib; { + mainProgram = "flat-manager"; + description = "Manager for flatpak repositories"; + longDescription = '' + flat-manager serves and maintains a Flatpak repository. You point it at an ostree + repository and it will allow Flatpak clients to install apps from the repository over HTTP. + Additionally, it has an HTTP API that lets you upload new builds and manage the repository. + ''; + homepage = "https://github.com/flatpak/flat-manager"; + changelog = "https://github.com/flatpak/flat-manager/releases/tag/${flat-manager.version}"; + maintainers = with maintainers; [getchoo]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/hadolint-sarif.nix b/pkgs/hadolint-sarif.nix deleted file mode 100644 index 44a813b..0000000 --- a/pkgs/hadolint-sarif.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - lib, - fetchFromGitHub, - rustPlatform, - hadolint-sarif, - testers, -}: -rustPlatform.buildRustPackage rec { - pname = "hadolint-sarif"; - version = "0.4.2"; - - src = fetchFromGitHub { - owner = "psastras"; - repo = "sarif-rs"; - rev = "${pname}-v${version}"; - hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; - }; - - cargoSha256 = "sha256-AMRL1XANyze8bJe3fdgZvBnl/NyuWP13jixixqiPmiw="; - cargoBuildFlags = ["--package" pname]; - cargoTestFlags = cargoBuildFlags; - - passthru = { - tests.version = testers.testVersion { - package = hadolint-sarif; - }; - }; - - meta = with lib; { - mainProgram = "hadolint-sarif"; - description = "A CLI tool to convert hadolint diagnostics into SARIF"; - homepage = "https://psastras.github.io/sarif-rs"; - maintainers = with maintainers; [getchoo]; - license = licenses.mit; - }; -} diff --git a/pkgs/hadolint-sarif/package.nix b/pkgs/hadolint-sarif/package.nix new file mode 100644 index 0000000..44a813b --- /dev/null +++ b/pkgs/hadolint-sarif/package.nix @@ -0,0 +1,36 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + hadolint-sarif, + testers, +}: +rustPlatform.buildRustPackage rec { + pname = "hadolint-sarif"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "psastras"; + repo = "sarif-rs"; + rev = "${pname}-v${version}"; + hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; + }; + + cargoSha256 = "sha256-AMRL1XANyze8bJe3fdgZvBnl/NyuWP13jixixqiPmiw="; + cargoBuildFlags = ["--package" pname]; + cargoTestFlags = cargoBuildFlags; + + passthru = { + tests.version = testers.testVersion { + package = hadolint-sarif; + }; + }; + + meta = with lib; { + mainProgram = "hadolint-sarif"; + description = "A CLI tool to convert hadolint diagnostics into SARIF"; + homepage = "https://psastras.github.io/sarif-rs"; + maintainers = with maintainers; [getchoo]; + license = licenses.mit; + }; +} diff --git a/pkgs/nixgc.nix b/pkgs/nixgc.nix deleted file mode 100644 index 9e25bd7..0000000 --- a/pkgs/nixgc.nix +++ /dev/null @@ -1,25 +0,0 @@ -# this is a shell script that uses the new nix cli to emulate -# nix-collect-garbage -{ - lib, - writeShellApplication, - nix, - fd, -}: -writeShellApplication { - name = "nixgc"; - - runtimeInputs = [nix fd]; - - text = '' - fd . /nix/var/nix/profiles /home/*/.local/state/nix/profiles -d 3 -t symlink -E '*-link' | while read -r profile; do - nix profile wipe-history --profile "$profile" "$@" - done - ''; - - meta = with lib; { - description = "nix-collect-garbage, but with nix profile"; - maintainers = [maintainers.getchoo]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/nixgc/package.nix b/pkgs/nixgc/package.nix new file mode 100644 index 0000000..9e25bd7 --- /dev/null +++ b/pkgs/nixgc/package.nix @@ -0,0 +1,25 @@ +# this is a shell script that uses the new nix cli to emulate +# nix-collect-garbage +{ + lib, + writeShellApplication, + nix, + fd, +}: +writeShellApplication { + name = "nixgc"; + + runtimeInputs = [nix fd]; + + text = '' + fd . /nix/var/nix/profiles /home/*/.local/state/nix/profiles -d 3 -t symlink -E '*-link' | while read -r profile; do + nix profile wipe-history --profile "$profile" "$@" + done + ''; + + meta = with lib; { + description = "nix-collect-garbage, but with nix profile"; + maintainers = [maintainers.getchoo]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/sarif-fmt.nix b/pkgs/sarif-fmt.nix deleted file mode 100644 index 451af0c..0000000 --- a/pkgs/sarif-fmt.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - rustPlatform, - clippy, - sarif-fmt, - testers, -}: -rustPlatform.buildRustPackage rec { - pname = "sarif-fmt"; - version = "0.4.2"; - - src = fetchFromGitHub { - owner = "psastras"; - repo = "sarif-rs"; - rev = "${pname}-v${version}"; - hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; - }; - - cargoSha256 = "sha256-dHOxVLXtnqSHMX5r1wFxqogDf9QdnOZOjTyYFahru34="; - cargoBuildFlags = ["--package" pname]; - cargoTestFlags = cargoBuildFlags; - - nativeCheckInputs = lib.optionals stdenv.isLinux [ - # test_clippy - clippy - ]; - - checkFlags = - [ - # this test uses nix so...no go - "--skip=test_clang_tidy" - # ditto - "--skip=test_hadolint" - # ditto - "--skip=test_shellcheck" - ] - ++ lib.optionals stdenv.isDarwin [ - "--skip=test_clippy" - ]; - - passthru = { - tests.version = testers.testVersion { - package = sarif-fmt; - }; - }; - - meta = with lib; { - mainProgram = "sarif-fmt"; - description = "A CLI tool to pretty print SARIF diagnostics"; - homepage = "https://psastras.github.io/sarif-rs"; - maintainers = with maintainers; [getchoo]; - license = licenses.mit; - }; -} diff --git a/pkgs/sarif-fmt/package.nix b/pkgs/sarif-fmt/package.nix new file mode 100644 index 0000000..451af0c --- /dev/null +++ b/pkgs/sarif-fmt/package.nix @@ -0,0 +1,56 @@ +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + clippy, + sarif-fmt, + testers, +}: +rustPlatform.buildRustPackage rec { + pname = "sarif-fmt"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "psastras"; + repo = "sarif-rs"; + rev = "${pname}-v${version}"; + hash = "sha256-EzWzDeIeSJ11CVcVyAhMjYQJcKHnieRrFkULc5eXAno="; + }; + + cargoSha256 = "sha256-dHOxVLXtnqSHMX5r1wFxqogDf9QdnOZOjTyYFahru34="; + cargoBuildFlags = ["--package" pname]; + cargoTestFlags = cargoBuildFlags; + + nativeCheckInputs = lib.optionals stdenv.isLinux [ + # test_clippy + clippy + ]; + + checkFlags = + [ + # this test uses nix so...no go + "--skip=test_clang_tidy" + # ditto + "--skip=test_hadolint" + # ditto + "--skip=test_shellcheck" + ] + ++ lib.optionals stdenv.isDarwin [ + "--skip=test_clippy" + ]; + + passthru = { + tests.version = testers.testVersion { + package = sarif-fmt; + }; + }; + + meta = with lib; { + mainProgram = "sarif-fmt"; + description = "A CLI tool to pretty print SARIF diagnostics"; + homepage = "https://psastras.github.io/sarif-rs"; + maintainers = with maintainers; [getchoo]; + license = licenses.mit; + }; +} diff --git a/pkgs/treefetch.nix b/pkgs/treefetch.nix deleted file mode 100644 index dd8283a..0000000 --- a/pkgs/treefetch.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - fetchFromGitHub, - rustPlatform, -}: -rustPlatform.buildRustPackage { - pname = "treefetch"; - version = "unstable-2022-06-08"; - - src = fetchFromGitHub { - owner = "angelofallars"; - repo = "treefetch"; - rev = "02f65e11e1f23d5fa9e66335eb5ff4f2f6b01400"; - sha256 = "sha256-FDiulTit492KwV46A3qwjHQwzpjVJvIXTfTrMufXd5k="; - }; - - cargoSha256 = "sha256-8HJYYPBogkgEfK3kv8dFUFaqUhvgYAOrhUIyZo3bqp8="; - - meta = with lib; { - 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; - }; -} diff --git a/pkgs/treefetch/package.nix b/pkgs/treefetch/package.nix new file mode 100644 index 0000000..dd8283a --- /dev/null +++ b/pkgs/treefetch/package.nix @@ -0,0 +1,27 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, +}: +rustPlatform.buildRustPackage { + pname = "treefetch"; + version = "unstable-2022-06-08"; + + src = fetchFromGitHub { + owner = "angelofallars"; + repo = "treefetch"; + rev = "02f65e11e1f23d5fa9e66335eb5ff4f2f6b01400"; + sha256 = "sha256-FDiulTit492KwV46A3qwjHQwzpjVJvIXTfTrMufXd5k="; + }; + + cargoSha256 = "sha256-8HJYYPBogkgEfK3kv8dFUFaqUhvgYAOrhUIyZo3bqp8="; + + meta = with lib; { + 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; + }; +} -- cgit v1.2.3