Skip to content

Commit

Permalink
refactor: consistent naming for unsetSourceDateEpoch*
Browse files Browse the repository at this point in the history
  • Loading branch information
loqusion committed Jan 3, 2025
1 parent 137ed74 commit 29144f9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ in {
linkVirtualPaths = callPackage ./linkVirtualPaths.nix {};
mkTypstDerivation = callPackage ./mkTypstDerivation.nix {};
typstOptsFromArgs = callPackage ./typstOptsFromArgs.nix {};
unsetSourceDateEpoch = callPackage ./setupHooks/unsetSourceDateEpoch.nix {};
unsetSourceDateEpochHook = callPackage ./setupHooks/unsetSourceDateEpoch.nix {};
watchTypstProject = callPackage ./watchTypstProject.nix {};
})
2 changes: 1 addition & 1 deletion lib/devShell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
inherit (lib) optionalAttrs optionalString;
inherit (lib.strings) concatStringsSep;

unsetSourceDateEpochScript = builtins.readFile ./setupHooks/unsetSourceDateEpoch.sh;
unsetSourceDateEpochScript = builtins.readFile ./setupHooks/unsetSourceDateEpochScript.sh;

cleanedArgs = removeAttrs args [
"checks"
Expand Down
4 changes: 2 additions & 2 deletions lib/mkTypstDerivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lib,
stdenvNoCC,
typst,
unsetSourceDateEpoch,
unsetSourceDateEpochHook,
}: args @ {
buildPhaseTypstCommand,
fontPaths ? [],
Expand Down Expand Up @@ -49,7 +49,7 @@ in
++ [
typst
(copyVirtualPathsHook virtualPaths)
unsetSourceDateEpoch
unsetSourceDateEpochHook
];

buildPhase =
Expand Down
4 changes: 2 additions & 2 deletions lib/setupHooks/unsetSourceDateEpoch.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{makeSetupHook}: let
unsetSourceDateEpoch = builtins.readFile ./unsetSourceDateEpoch.sh;
unsetSourceDateEpochScript = builtins.readFile ./unsetSourceDateEpochScript.sh;
in
makeSetupHook {
name = "unsetSourceDateEpoch";
substitutions = {
inherit unsetSourceDateEpoch;
inherit unsetSourceDateEpochScript;
};
}
./unsetSourceDateEpochHook.sh
2 changes: 1 addition & 1 deletion lib/setupHooks/unsetSourceDateEpochHook.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
unsetSourceDateEpoch() {
@unsetSourceDateEpoch@
@unsetSourceDateEpochScript@
}

preBuildHooks+=(unsetSourceDateEpoch)
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/watchTypstProject.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{inherit typstSource;} // args
));

unsetSourceDateEpochScript = builtins.readFile ./setupHooks/unsetSourceDateEpoch.sh;
unsetSourceDateEpochScript = builtins.readFile ./setupHooks/unsetSourceDateEpochScript.sh;

cleanedArgs = removeAttrs args [
"fontPaths"
Expand Down

0 comments on commit 29144f9

Please sign in to comment.