diff --git a/default.nix b/default.nix index d05ae45..440008e 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,41 @@ { - pkgs ? import { - inherit system; - config = { }; - overlays = [ ]; - }, + pkgs ? + import { + inherit system; + config = {}; + overlays = []; + }, system ? builtins.currentSystem, -}: -{ - catwalk = pkgs.callPackage ./nix/package.nix { }; +}: { + catwalk = pkgs.callPackage ( + { + lib, + rustPlatform, + }: + rustPlatform.buildRustPackage { + pname = "catppuccin-catwalk"; + inherit ((lib.importTOML ./Cargo.toml).package) version; + + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ./.)) ( + lib.fileset.unions [ + ./Cargo.toml + ./Cargo.lock + ./src + ./LICENSE + ] + ); + }; + + cargoLock.lockFile = ./Cargo.lock; + + meta = { + homepage = "https://github.com/catppuccin/catwalk"; + description = "🚶 Soothing pastel previews for the high-spirited!"; + license = lib.licenses.mit; + mainProgram = "catwalk"; + }; + } + ) {}; } diff --git a/nix/package.nix b/nix/package.nix deleted file mode 100644 index 358d46e..0000000 --- a/nix/package.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, rustPlatform }: -rustPlatform.buildRustPackage { - pname = "catppuccin-catwalk"; - inherit ((lib.importTOML ../Cargo.toml).package) version; - - src = lib.fileset.toSource { - root = ../.; - fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ../.)) ( - lib.fileset.unions [ - ../Cargo.toml - ../Cargo.lock - ../src - ../LICENSE - ] - ); - }; - - cargoLock.lockFile = ../Cargo.lock; - - meta = { - homepage = "https://github.com/catppuccin/catwalk"; - description = "🚶 Soothing pastel previews for the high-spirited!"; - license = lib.licenses.mit; - mainProgram = "catwalk"; - }; -}