[Nix-dev] rm -fr /nix/store/foo ? if foo is a dep its not rebuilt?
Lluís Batlle
viriketo at gmail.com
Sat Feb 28 18:21:46 CET 2009
I think nix may notice that the dependency is not 'runtime', but only
'build time'. That may not rebuild B, if you want C, and C is already
done.
In any case, I think you should use the "nix-store --delete" if you
want to delete a path of the store.
Regards,
Lluís.
2009/2/28 Marc Weber <marco-oweber at gmx.de>:
> I'v noticed that if you have a dependency chain such as
> A -> B -> C and you do rm -fr /nix/store/*-B and nix-store --verify
> nix-store notes that the path is missing.
>
> But you nix won't rebuild B when you realise C?
> Have I missed something ?
>
> I've used something simple like this in my ~/.nixpkgs/config.nix:
>
> {
> packageOverrides = pkgs : with pkgs;
> let
> foo = name : deps : stdenv.mkDerivation {
> name = "test-${name}";
> phases = "buildPhase";
> buildPhase = ''
> set -x
> ensureDir $out;
> for i in ${builtins.toString deps}; do
> echo $i > $out/foo
> done
> '';
> };
> in rec {
> A = foo "A" [];
> B = foo "B" [A];
> C = foo "C" [B];
> }
> }
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>
More information about the nix-dev
mailing list