diff --git a/pkgs/zsa-keymapp/.gitattributes b/pkgs/zsa-keymapp/.gitattributes deleted file mode 100644 index fbddd0d..0000000 --- a/pkgs/zsa-keymapp/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -keymapp filter=lfs diff=lfs merge=lfs -text diff --git a/pkgs/zsa-keymapp/default.nix b/pkgs/zsa-keymapp/default.nix index 66827fb..9231b9b 100644 --- a/pkgs/zsa-keymapp/default.nix +++ b/pkgs/zsa-keymapp/default.nix @@ -1,24 +1,27 @@ { buildFHSUserEnv, writeShellScript, + fetchzip, }: # Copied/Adapted from: https://github.com/pope/personal/commit/5cf0d43c7ffec572b46fcd96f08c5e9748ead9d4 let - # @2023-11 ZSA doesn't seem to have published Keymapp' sources, + # @2023-11 ZSA will not publish Keymapp' sources, # and only give a download link to the LATEST version of the built software. - # - # In the meantime, download the latest version from: - # https://oryx.nyc3.cdn.digitaloceanspaces.com/keymapp/keymapp-latest.tar.gz - # And put the binary locally in the repo (through Git LFS). - keymapp-binary = ./keymapp; + # NOTE: fetchzip is not limited to zip files and supports many archives formats + keymapp-binary = fetchzip { + url = "https://oryx.nyc3.cdn.digitaloceanspaces.com/keymapp/keymapp-latest.tar.gz"; + # WARNING: The URL is impure, it does not lock to a version, so the hash can easily be outdated + # (and I'd be aware of that only if I do a re-install without my current store) + hash = "sha256-+tunfmnjFsqhkmzK3V6efcJ9u3qapx41JUzH/z4dUis"; + # archive contains binary + an icon file, don't try to extract a single file + stripRoot = false; + }; in buildFHSUserEnv { name = "keymapp"; - runScript = writeShellScript "keymapp-wrapper.sh" '' - exec ${keymapp-binary} "$@" - ''; + runScript = "${keymapp-binary}/keymapp"; targetPkgs = pkgs: [ pkgs.gdk-pixbuf pkgs.glib diff --git a/pkgs/zsa-keymapp/keymapp b/pkgs/zsa-keymapp/keymapp deleted file mode 100755 index df6bf94..0000000 --- a/pkgs/zsa-keymapp/keymapp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c90f2252210ae79ef25259ed93135d9c2040c2b571cec57e9b1b197e68efedc9 -size 11859408