summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2024-07-22 02:57:42 -0400
committerseth <[email protected]>2024-07-22 02:57:42 -0400
commit8160024f34c51057c8c2956113da6a3974d931d6 (patch)
treeea6ee408285956366e7031a35e135cccc44cd7b3
parent0bf7c814c371092f20cd2219e94505ad2def001f (diff)
drop clippy-sarif
it's been merged into nixpkgs
-rw-r--r--default.nix32
-rw-r--r--flake.nix17
-rw-r--r--pkgs/clippy-sarif/package.nix39
3 files changed, 24 insertions, 64 deletions
diff --git a/default.nix b/default.nix
index 86d2c78..17aa27c 100644
--- a/default.nix
+++ b/default.nix
@@ -17,22 +17,20 @@ in
system ? builtins.currentSystem,
}:
let
- inherit (pkgs) callPackage;
-in
-lib.fix (
- final:
- lib.packagesFromDirectoryRecursive {
- inherit callPackage;
- directory = ./pkgs;
- }
- // {
- clippy-sarif = callPackage ./pkgs/clippy-sarif/package.nix { inherit (final) clippy-sarif; };
+ packages =
+ lib.packagesFromDirectoryRecursive {
+ inherit (pkgs) callPackage;
+ directory = ./pkgs;
+ }
+ // {
+ flat-manager = pkgs.callPackage ./pkgs/flat-manager/package.nix {
+ inherit (packages) flat-manager;
+ };
+ flat-manager-client = pkgs.callPackage ./pkgs/flat-manager-client/package.nix {
+ inherit (packages) 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 = pkgs.callPackage ./pkgs/papa/package.nix { inherit (packages) papa; };
};
-
- papa = callPackage ./pkgs/papa/package.nix { inherit (final) papa; };
- }
-)
+in
+packages
diff --git a/flake.nix b/flake.nix
index 37b0a77..a9e8876 100644
--- a/flake.nix
+++ b/flake.nix
@@ -45,15 +45,16 @@
let
pkgs = nixpkgsFor.${system};
- /*
- this filters out packages that may be broken or not supported
- on the current system. packages that have no `broken` or `platforms`
- meta attribute are assumed to be valid
- */
- isValid =
- _: v: lib.elem pkgs.system (v.meta.platforms or [ pkgs.system ]) && !(v.meta.broken or false);
+ isAvailable = lib.meta.availableOn { inherit system; };
- pkgs' = lib.filterAttrs isValid (import ./. { inherit pkgs; });
+ pkgs' = lib.filterAttrs (lib.const isAvailable) (
+ import ./. {
+ inherit system;
+ inherit nixpkgs;
+ inherit pkgs;
+ inherit (pkgs) lib;
+ }
+ );
in
pkgs' // { default = pkgs'.treefetch; }
);
diff --git a/pkgs/clippy-sarif/package.nix b/pkgs/clippy-sarif/package.nix
deleted file mode 100644
index e180b12..0000000
--- a/pkgs/clippy-sarif/package.nix
+++ /dev/null
@@ -1,39 +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;
- };
-}