| 2 May 2024 |
azazel75 | thanks, I'll try to do that | 15:15:35 |
azazel75 | gitIgnoreFilterWith is https://github.com/hercules-ci/gitignore.nix/blob/master/find-files.nix#L24 | 15:16:34 |
| CabalCrow joined the room. | 15:41:17 |
| CabalCrow left the room. | 15:45:53 |
| CabalCrow joined the room. | 15:46:29 |
CabalCrow | is there a way to force nixos-rebuild to copy .git folders into the store directory? | 15:48:25 |
mewp | you could likely create a package with the current configuration repo if that's what you want. no built-in module for that afaik | 15:50:07 |
azazel75 | so, i did what you suggested mewp , whit a new package like:
pkgsSrcContents = pkgs.stdenvNoCC.mkDerivation {
name = "src-contents";
src = pkgsSrc;
builder = pkgs.writeText "builder.sh" ''
${pkgs.findutils}/bin/find $src >> $out
'';
};
| 15:55:20 |
CabalCrow | well that is a shame | 15:55:26 |
azazel75 | it turns out that even if flake.nix isn't in the resulting $src, if I change it between two runs the hash of that $src store path will change | 15:57:12 |
mewp | interesting, what about this last package containing only the names? does it also change? | 15:58:04 |
azazel75 | it changes because the path of $src changes... I should calculate a checksum of the whole contents of $src, maybe with a volatile tar command.. | 15:59:35 |
mewp | you can avoid that by cding to the directory before find | 16:00:18 |
azazel75 | yes | 16:00:53 |
mewp | then you'll be able to see if the list of files changes. you can also do find -type f . | sha1sum to see if the hashes differ | 16:02:10 |
mewp | it would be very weird for the hash to change without src changing | 16:02:45 |
mewp | (none of this has anything to do with flakes btw, this would work the same without them) | 16:04:19 |
azazel75 | find -type f . | sha1sum would expose only a difference in the names of the contents though | 16:08:54 |
mewp | sorry, find -type f . | xargs sha1sum is what I meant | 16:09:50 |
| @nick_kadutskyi:matrix.org joined the room. | 17:15:10 |
| soyouzpanda joined the room. | 17:18:21 |
| NixOS Moderation Bot unbanned ultranix. | 19:05:32 |
| @theutz:matrix.org joined the room. | 19:54:16 |
| Hayden joined the room. | 20:40:32 |
| @nick_kadutskyi:matrix.org set a profile picture. | 21:19:13 |
| 4 May 2024 |
| Ilya Zuev joined the room. | 06:48:30 |
| @abmantis:abcosta.com joined the room. | 19:18:22 |
@abmantis:abcosta.com | Hey! Why is it that when I use nix develop (on some repo I've used already) it fetches and updates the packages automatically? It takes quite a while, and I would be happy most of the times to use the current packages I already used one day ago. any way to stop that? | 19:24:06 |
mewp | I don't use nix develop, so I'm not sure, but direnv with use flake definitely doesn't do that | 19:25:44 |
tomberek | Do you have automatic GC turned on to run nightly? If so, a feature that might help you is "nix develop --profile ./tools". It makes a symlink to protect that stuff from GC. You can even enter that profile directly instead of the flake-defined one with "nix develop ./tools". | 20:11:57 |