Skip to content

Commit

Permalink
input-remapper: Don't use hacky "we-have-finalattrs-at-home"
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Jul 18, 2024
1 parent 170a0c1 commit 1be120c
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions pkgs/tools/inputmethods/input-remapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ in
'' + lib.optionalString withDebugLogLevel ''
# if debugging
substituteInPlace inputremapper/logger.py --replace "logger.setLevel(logging.INFO)" "logger.setLevel(logging.DEBUG)"
'' + ''
# set revision for --version output
echo "COMMIT_HASH = '${src.rev}'" > inputremapper/commit_hash.py
'';

doCheck = withDoCheck;
Expand Down Expand Up @@ -144,14 +147,4 @@ in
maintainers = with maintainers; [ LunNova ];
mainProgram = "input-remapper-gtk";
};
}).overrideAttrs (final: prev: {
# Set in an override as buildPythonApplication doesn't yet support
# the `final:` arg yet from #119942 'overlay style overridable recursive attributes'
# this ensures the rev matches the input src's rev after overriding
# See https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293/7 for more
# discussion
postPatch = prev.postPatch or "" + ''
# set revision for --version output
echo "COMMIT_HASH = '${final.src.rev}'" > inputremapper/commit_hash.py
'';
})

0 comments on commit 1be120c

Please sign in to comment.