diff --git a/flake.nix b/flake.nix index 1f5b65a..1667d86 100644 --- a/flake.nix +++ b/flake.nix @@ -17,9 +17,7 @@ nixpkgs, flake-parts, ... - } @ inputs: let - pins = import ./npins; - in + } @ inputs: flake-parts.lib.mkFlake {inherit inputs self;} { systems = import inputs.systems; imports = [flake-parts.flakeModules.easyOverlay]; @@ -31,7 +29,13 @@ lib, ... }: let + inherit (builtins) concatStringsSep match; + inherit (lib.attrsets) recursiveUpdate; inherit (lib.filesystem) packagesFromDirectoryRecursive; + inherit (lib.customisation) callPackageWith; + + pins = import ./npins; + date = concatStringsSep "-" (match "(.{4})(.{2})(.{2}).*" self.lastModifiedDate); in { _module.args.pkgs = import nixpkgs { inherit system; @@ -40,7 +44,7 @@ overlayAttrs = config.packages; packages = packagesFromDirectoryRecursive { - callPackage = lib.callPackageWith (pkgs // {inherit pins;}); + callPackage = callPackageWith (recursiveUpdate pkgs {inherit pins date;}); directory = ./pkgs; }; diff --git a/npins/sources.json b/npins/sources.json index 55cbbe1..0e8c116 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -30,6 +30,20 @@ "url": "https://api.github.com/repos/alok8bb/cloneit/tarball/0.1.0", "hash": "18z4vxrfvyp20kig2s9k5y3034nw39wkj8zzk9qskiisv2ypy90b" }, + "foot": { + "type": "GitRelease", + "repository": { + "type": "Git", + "url": "https://codeberg.org/dnkl/foot.git" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "version": "1.17.2", + "revision": "ebbc1afc2eaea555698a61ef9e1e127e75d69845", + "url": null, + "hash": "1gi2c3zxyyf3l3wp702yfwxk512yz83rk06wljc7wlkbf1c9msm7" + }, "mov-cli": { "type": "GitRelease", "repository": { diff --git a/pkgs/foot-transparent/package.nix b/pkgs/foot-transparent/package.nix index 5499568..896fbfa 100644 --- a/pkgs/foot-transparent/package.nix +++ b/pkgs/foot-transparent/package.nix @@ -2,24 +2,28 @@ lib, fetchFromGitea, foot, + pins, + date, ... }: foot.overrideAttrs (prev: let - version = "2024-03-14-unstable"; + pin = pins.foot; in { - inherit version; + pname = "foot-transparent"; + version = "0-${date}-unstable"; src = fetchFromGitea { domain = "codeberg.org"; owner = "dnkl"; repo = "foot"; - rev = "aea16ba5d2896ef22bf0bea45e5e8142c0ff1c2a"; - hash = "sha256-CeDQriQIbyx3V1l719g3AuhnVVYYc63kA0BQpEFQ26A="; + rev = pin.revision; + sha256 = pin.hash; }; patches = (prev.patches or []) ++ [./0001-fullscreen-transparency.patch]; mesonFlags = (prev.mesonFlags or []) ++ ["-Dfullscreen_alpha=true"]; meta = { + description = "Patched version of Foor terminal emulator that brings back fullscreen transparency"; mainProgram = "foot"; maintainers = with lib.maintainers; [NotAShelf]; };