tag:blogger.com,1999:blog-1397115249631682228.post658677554322869675..comments2024-03-29T05:41:44.373+01:00Comments on Sander van der Burg's blog: Managing private Nix packages outside the Nixpkgs treeSander van der Burghttp://www.blogger.com/profile/12718166966821611609noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-1397115249631682228.post-89267978897989154112016-08-12T20:50:48.017+02:002016-08-12T20:50:48.017+02:00Your fix worked as expected. Thanks!Your fix worked as expected. Thanks!DavidShttps://www.blogger.com/profile/00139682119347026449noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-79770241568697220722016-06-22T21:23:27.181+02:002016-06-22T21:23:27.181+02:00The issue that you ran into is not something relat...The issue that you ran into is not something related to separating packages from the main Nixpkgs repository, but something different.<br /><br />Apparently, your package tries to statically link to libm.a and libc.a. In the master-branch of Nixpkgs, many packages have been split into multiple outputs to save disk space consumption.<br /><br />glibc has been splitted into multiple outputs as well. The static libraries are copied into the 'static' output directory and not into the default output directory.<br /><br />To refer to it, change the line:<br /><br />buildInputs = [ glibc ];<br /><br />into<br /><br />buildInputs = [ glibc.static ];<br /><br />and then it should work as expected.<br />Sander van der Burghttps://www.blogger.com/profile/12718166966821611609noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-89678462204559911472016-06-20T22:22:55.794+02:002016-06-20T22:22:55.794+02:00I am using nix-build (Nix) 1.11.2
I am using nix-build (Nix) 1.11.2<br />DavidShttps://www.blogger.com/profile/00139682119347026449noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-89607429948189726332016-06-20T22:21:44.975+02:002016-06-20T22:21:44.975+02:00Thanks for the great post!
I tried following your...Thanks for the great post!<br /><br />I tried following your example and wrote a single package outside of the nixpkgs tree... and I am running into a dependency issue.<br /><br />Steps and error:<br />http://pastebin.com/m1hXZ81e<br /><br />The env-vars file in the build directory suggests that the $NIX_LDFLAGS contain the proper library path for glibc, but the gcc compiler still cannot find -lm and -lc. The directory pointed to by env-vars does contain libm.so and libc.so<br /><br />http://pastebin.com/Km1s73gX<br /><br /><br />I get the same missing library error if I used your private composition expression.<br /><br />I don't get this error if the package is incorporated into the nixpkgs tree:<br /><br />http://pastebin.com/w46gYiZn<br /><br />Any suggestions?<br />DavidShttps://www.blogger.com/profile/00139682119347026449noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-50080922115228800262015-07-21T22:24:10.298+02:002015-07-21T22:24:10.298+02:00Sure! Just configure the NIX_PATH environment vari...Sure! Just configure the NIX_PATH environment variable to point to its location. For example, by providing the following:<br /><br />export NIX_PATH=nixpkgs=/home/sander/nixpkgs:$NIX_PATH<br /><br />the above expressions refer to a Nixpkgs clone in my home directory.Sander van der Burghttps://www.blogger.com/profile/12718166966821611609noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-76757608181896294362015-07-21T17:36:36.047+02:002015-07-21T17:36:36.047+02:00Hello, Sander!
Can I do the same with a clone of ...Hello, Sander!<br /><br />Can I do the same with a clone of Nixpkgs source tree (not the original, but a modified one, like <a href="https://github.com/AndersonTorres/nixpkgs" rel="nofollow">mine</a>)?torres.andersonhttps://www.blogger.com/profile/08683269282126942617noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-45923953523262964522015-04-20T22:28:33.455+02:002015-04-20T22:28:33.455+02:00Great post!
This is exactly what I was looking fo...Great post! <br />This is exactly what I was looking for.Unknownhttps://www.blogger.com/profile/06433324468268524909noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-5744484397615235942014-10-09T00:23:21.996+02:002014-10-09T00:23:21.996+02:00It's also possible to use a different and perh...It's also possible to use a different and perhaps a much simpler approach. fetchurl {} and several other download functions in Nixpkgs are so-called fixed output derivations, meaning that it does not matter how and where something it's obtained as long as the output hash corresponds to the specified one.<br /><br />So if you're offline and have a tarball elsewhere -- such as in your home directory -- you could manually import it into the Nix store, by running:<br /><br />$ nix-prefetch-url file:///home/sander/mc-4.8.12.tar.bz2<br /><br />When you try to build any package referring to fixed output derivation using this file it will simply proceed, because it detects that a file with the given output hash is already provided.<br /><br />No need to modify any code. Simple as that :)Sander van der Burghttps://www.blogger.com/profile/12718166966821611609noreply@blogger.comtag:blogger.com,1999:blog-1397115249631682228.post-5487288366294546822014-09-02T09:49:52.362+02:002014-09-02T09:49:52.362+02:00Very helpful post.
What do you do in the case tha...Very helpful post.<br /><br />What do you do in the case that an archive isn't available on a remote server? A local source tree for example.<br /><br />I have been using git --archive... and dumping a tarball in /tmp, which I then reference in default.nix for my target package by setting src = /tmp/name.tar.gz;.<br /><br />Thanks, Chris.Anonymousnoreply@blogger.com