summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-03-30 21:38:57 -0400
committerSeth Flynn <[email protected]>2025-03-30 22:08:05 -0400
commitb75b85d4a7130ee051004c187c0a5af00f449e6e (patch)
treed7904529faa108f7b68b7fb05097cdebb3bff635
parentedbe9b7d259b95b48eae8b4f4853b1e5ad6ab537 (diff)
refactor(nix): nix-filter -> lib.fileset
-rw-r--r--flake.lock16
-rw-r--r--flake.nix7
-rw-r--r--nix/package.nix14
-rw-r--r--nix/static.nix4
4 files changed, 11 insertions, 30 deletions
diff --git a/flake.lock b/flake.lock
index fe33d10..18b4f63 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,20 +1,5 @@
{
"nodes": {
- "nix-filter": {
- "locked": {
- "lastModified": 1731533336,
- "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
- "owner": "numtide",
- "repo": "nix-filter",
- "rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "nix-filter",
- "type": "github"
- }
- },
"nixpkgs": {
"locked": {
"lastModified": 1743076231,
@@ -33,7 +18,6 @@
},
"root": {
"inputs": {
- "nix-filter": "nix-filter",
"nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix"
}
diff --git a/flake.nix b/flake.nix
index 202931b..369665c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,8 +4,6 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
- nix-filter.url = "github:numtide/nix-filter";
-
# Inputs below this are optional
# `inputs.treefmt-nix.follows = ""`
@@ -19,7 +17,6 @@
{
self,
nixpkgs,
- nix-filter,
treefmt-nix,
}:
let
@@ -105,11 +102,11 @@
pkgs = nixpkgsFor.${system};
packages' = self.packages.${system};
- staticWith = pkgs.callPackage ./nix/static.nix { inherit nix-filter self; };
+ staticWith = pkgs.callPackage ./nix/static.nix { inherit self; };
containerize = pkgs.callPackage ./nix/containerize.nix { };
in
{
- nixpkgs-tracker-bot = pkgs.callPackage ./nix/package.nix { inherit nix-filter self; };
+ nixpkgs-tracker-bot = pkgs.callPackage ./nix/package.nix { inherit self; };
default = packages'.nixpkgs-tracker-bot;
diff --git a/nix/package.nix b/nix/package.nix
index d0d1a83..1c9cc4e 100644
--- a/nix/package.nix
+++ b/nix/package.nix
@@ -7,7 +7,6 @@
rustPlatform,
self,
- nix-filter,
lto ? true,
optimizeSize ? false,
}:
@@ -16,12 +15,13 @@ rustPlatform.buildRustPackage {
pname = "nixpkgs-tracker-bot";
version = self.shortRev or self.dirtyShortRev or "unknown";
- src = nix-filter.lib.filter {
- root = self;
- include = [
- "crates"
- "Cargo.toml"
- "Cargo.lock"
+ src = lib.fileset.toSource {
+ root = ../.;
+ fileset = lib.fileset.unions [
+ ../Cargo.lock
+ ../Cargo.toml
+
+ ../crates
];
};
diff --git a/nix/static.nix b/nix/static.nix
index 5c7f528..73c3595 100644
--- a/nix/static.nix
+++ b/nix/static.nix
@@ -1,6 +1,5 @@
{
pkgsCross,
- nix-filter,
self,
}:
@@ -15,8 +14,9 @@ in
let
crossPkgs = crossPkgsFor.${arch};
in
+
(crossPkgs.callPackage ./package.nix {
- inherit nix-filter self;
+ inherit self;
optimizeSize = true;
}).overrideAttrs
(old: {