Hi, On 26/07/14 11:37, Roger Qiu wrote:
> I've tried using the `nix-store --query --deriver $(which binary)` in > order to get the path to the `.drv` file. However it never seems to give > me the right derivation file. The deriver is not uniquely defined. Due to fixed-output derivations, there can be any number of derivations that produce the same output path. (E.g. if you change the URL in a fetchurl call, it changes the derivation but not the output path.) Yes, this makes the utility of storing the deriver in the database kinda questionable... > For example: > > ``` > $ nix-store --query --deriver $(which firefox) > /nix/store/x505j55hvf2si7pfpwnpj7sljjshai9d-firefox-29.0.1.drv > > $ ls | grep firefox > 2xzsarr6v7rscwwg4vmh4k8861ybbdpf-firefox-29.0.1 > 6i0lnsy8yg8r8rf0wb9ncfbzcmqj0jpx-firefox-29.0.1.drv > j4axk28ghg7as3xi570p74dgmqn9saaa-firefox-29.0.1.source.tar.bz2.drv > ``` > > As you can see the real drv file which is > `6i0lnsy8yg8r8rf0wb9ncfbzcmqj0jpx-firefox-29.0.1.drv` Did you do "nix-store -q /nix/store/6i0lnsy8yg8r8rf0wb9ncfbzcmqj0jpx-firefox-29.0.1.drv" to check? It could actually be a different derivation of Firefox 29.0.1 (e.g. due to a changed dependency). -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
