Skip to content

Commit

Permalink
Avoid perms error by using cp instead of ln
Browse files Browse the repository at this point in the history
  • Loading branch information
waxlamp committed Mar 14, 2021
1 parent 69e379d commit 456a684
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions posts/your-first-derivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ pkgs.stdenv.mkDerivation {
# $src is defined as the location of our `src` attribute above
installPhase = ''
# $out is an automatically generated filepath by nix,
# but it's up to you to make it what you need
ln -s $src $out
# but it's up to you to make it what you need. We'll create a directory at
# that filepath, then copy our sources into it.
mkdir $out
cp -rv $src/* $out
'';
}
```
Expand Down Expand Up @@ -90,9 +92,6 @@ $ nix-build
$ readlink result
/nix/store/kgjcq77210jkjppc8628vcl27i6f22k8-basic-derivation

$ readlink -f result
/nix/store/54992nknd3av7j4p7fmsh96ja5hp1vli-src

$ ls result
hi.txt

Expand Down

0 comments on commit 456a684

Please sign in to comment.