1

I'm trying to better understand nix, so I'm working through this nix pill.

nix-store -q --tree does show dependencies as a tree, but for each dependency A it always says A depends on A:

➤ nix-store -q --tree `which hello` | sed -e 's;/nix/store/\w*-;;'                                     
/nix/store/73vi2xn1ihhvwxnas8rlrzwwvxg4jnc3-hello-2.10                                 
+---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6      
|   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]            
+---/nix/store/l6vc09xa77m8rf0fcg151zfmsqq5xk7p-swift-corefoundation                 
    +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    +---/nix/store/azffgydz8l0q1dqadxxqcihvs6ms43wi-curl-7.67.0              
    |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11                
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11 [...]
    |   +---/nix/store/dxvg1ppkzca0mfw87cj7y4dvqvd0yd9b-libkrb5-1.17                                                                                                                                        
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/mg4y1vjgvz508n4qrhcilz52j0iil1f2-bash-4.4-p23
    |   |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   |   +---/nix/store/mg4y1vjgvz508n4qrhcilz52j0iil1f2-bash-4.4-p23 [...]
    |   |   +---/nix/store/dxvg1ppkzca0mfw87cj7y4dvqvd0yd9b-libkrb5-1.17 [...]
    |   +---/nix/store/fqp759in85sx60a0kf4lwwmfxhp959mc-nghttp2-1.39.2-lib
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/fqp759in85sx60a0kf4lwwmfxhp959mc-nghttp2-1.39.2-lib [...]
    |   +---/nix/store/myxhzlr19zbc74393zws8vcz6wd6rhgw-openssl-1.1.1d
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/myxhzlr19zbc74393zws8vcz6wd6rhgw-openssl-1.1.1d [...]
    |   +---/nix/store/lbb92wgcdcmzcia1j3xgdl7bv5vzsx8l-libssh2-1.9.0
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11 [...]
    |   |   +---/nix/store/myxhzlr19zbc74393zws8vcz6wd6rhgw-openssl-1.1.1d [...]
    |   |   +---/nix/store/lbb92wgcdcmzcia1j3xgdl7bv5vzsx8l-libssh2-1.9.0 [...]
    |   +---/nix/store/azffgydz8l0q1dqadxxqcihvs6ms43wi-curl-7.67.0 [...]
    +---/nix/store/b641cgsl5cqlx53dyn6ksnjki1d9p77w-ICU-osx-10.10.5
    |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/s6xs9pw3clsdqfgahkdvbncq6gfvgy6q-libc++-7.1.0
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/i6384lql064pvxld39ds37gsfh8nllsy-libc++abi-7.1.0
    |   |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   |   +---/nix/store/i6384lql064pvxld39ds37gsfh8nllsy-libc++abi-7.1.0 [...]
    |   |   +---/nix/store/s6xs9pw3clsdqfgahkdvbncq6gfvgy6q-libc++-7.1.0 [...]
    |   +---/nix/store/b641cgsl5cqlx53dyn6ksnjki1d9p77w-ICU-osx-10.10.5 [...]
    +---/nix/store/kr0pvym8qw7pd33w7h5z9kvbkxvl7k70-libxml2-2.9.9
        +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
        +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11 [...]
        +---/nix/store/kr0pvym8qw7pd33w7h5z9kvbkxvl7k70-libxml2-2.9.9 [...]

Is there a way I can mute these autodependencies?

For example, I'd want something more like:

/nix/store/73vi2xn1ihhvwxnas8rlrzwwvxg4jnc3-hello-2.10
+---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6
+---/nix/store/l6vc09xa77m8rf0fcg151zfmsqq5xk7p-swift-corefoundation
    +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    +---/nix/store/azffgydz8l0q1dqadxxqcihvs6ms43wi-curl-7.67.0
    |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/dxvg1ppkzca0mfw87cj7y4dvqvd0yd9b-libkrb5-1.17
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   |   +---/nix/store/mg4y1vjgvz508n4qrhcilz52j0iil1f2-bash-4.4-p23
    |   |       +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/fqp759in85sx60a0kf4lwwmfxhp959mc-nghttp2-1.39.2-lib
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/myxhzlr19zbc74393zws8vcz6wd6rhgw-openssl-1.1.1d
    |   |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/lbb92wgcdcmzcia1j3xgdl7bv5vzsx8l-libssh2-1.9.0
    |       +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |       +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11 [...]
    |       +---/nix/store/myxhzlr19zbc74393zws8vcz6wd6rhgw-openssl-1.1.1d [...]
    +---/nix/store/b641cgsl5cqlx53dyn6ksnjki1d9p77w-ICU-osx-10.10.5
    |   +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |   +---/nix/store/s6xs9pw3clsdqfgahkdvbncq6gfvgy6q-libc++-7.1.0
    |       +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    |       +---/nix/store/i6384lql064pvxld39ds37gsfh8nllsy-libc++abi-7.1.0
    |           +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
    +---/nix/store/kr0pvym8qw7pd33w7h5z9kvbkxvl7k70-libxml2-2.9.9
        +---/nix/store/7c9ilw9zna1m3dlkd4bp80czya62px0s-Libsystem-osx-10.12.6 [...]
        +---/nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11 [...]
1
  • My guess is that it means the packages contains references to themselves. For example the library /nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11/lib/libz.dylibcontains the string /nix/store/7ljasc5gq7kk1796hqwm0j63pvak1rmw-zlib-1.2.11/lib/libz.dylib. I don't know the answer to your second question, but --graph doesn't do self-references. – Hjulle Apr 29 '20 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.