Skip to content

Commit

Permalink
keymapp: Update @2024-03-08 (remove binary, nix is broken with git-lfs)
Browse files Browse the repository at this point in the history
Using git-lfs, when the flake copies the repo to the store (for purity)
the 'virtual file' stored in git is copied (with oid/size info of the
object in LFS) instead of the actual (large) file :/
ref: NixOS/nix#10153

I think it was working before because the file was in git temporarily at
some point, then I moved it to LFS, but after the system was built..
(or something like that 🤷)
  • Loading branch information
bew committed Mar 8, 2024
1 parent fdeafef commit 25d91c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion pkgs/zsa-keymapp/.gitattributes

This file was deleted.

21 changes: 12 additions & 9 deletions pkgs/zsa-keymapp/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions pkgs/zsa-keymapp/keymapp

This file was deleted.

0 comments on commit 25d91c4

Please sign in to comment.