Stow doesn't like when the origin path changes randomly (like when updating a flake input)
This commit is contained in:
SebastianStork 2025-12-02 22:31:20 +01:00
parent 1c9a690572
commit 71794dd9c9
Signed by: SebastianStork
SSH key fingerprint: SHA256:iEM011ogNMG1q8+U500adGu/9rpPuZ2KnFtbdLeqTiI
2 changed files with 6 additions and 4 deletions

6
flake.lock generated
View file

@ -3,10 +3,10 @@
"inputs": { "inputs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1764662864, "lastModified": 1764710882,
"narHash": "sha256-PZStjjkkc1p4qCdVBoPpkpWeINSfq1yPilw/slK9E8k=", "narHash": "sha256-lgnEbzbtGf7XYe9gCOhOJtLgpmosv6i8S11MTOy6o2k=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "2e87000c9541f3b52db15834366cfb487c6cc523", "rev": "9e2bfce3c17983bc850271e3bcc89045e82d9b7c",
"shallow": true, "shallow": true,
"type": "git", "type": "git",
"url": "ssh://git@github.com/SebastianStork/advent-of-code-inputs.git" "url": "ssh://git@github.com/SebastianStork/advent-of-code-inputs.git"

View file

@ -29,7 +29,9 @@
default = pkgs.mkShellNoCC { default = pkgs.mkShellNoCC {
packages = [ pkgs.stow ]; packages = [ pkgs.stow ];
shellHook = '' shellHook = ''
stow --dir=${inputs} --target=./. package mkdir --parents .nix/inputs
ln --symbolic --force --no-dereference "${inputs}" .nix/inputs/package-src
stow --dir=.nix/inputs --target=./. --restow package-src
''; '';
}; };