Chiliparrot has joined #nix-darwin
ncl has quit [Ping timeout: 240 seconds]
ncl has joined #nix-darwin
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
johnw has quit [Quit: ZNC - http://znc.in]
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Chiliparrot has joined #nix-darwin
hedgie_ has quit [Ping timeout: 258 seconds]
__monty__ has joined #nix-darwin
Chiliparrot has quit [Ping timeout: 260 seconds]
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Client Quit]
Joestar79 has joined #nix-darwin
<Joestar79> hi all
hedgie has joined #nix-darwin
<Joestar79> I just checked out https://github.com/NixOS/nixpkgs/pull/71983/commits/a038ae1118a676f956c9cf50b78e6e0144c44266 and tried to add that helm version to my darwin-configuration.nix, just like that: kubernetes-helm = self.callPackage ./helm215.nix {}; inside my nixpkgs.overlays = [ (self: super: rec {
<Joestar79> it builds just fine but as soon as it print to the console installing, I got this error message: mkdir: cannot create directory '/share': Read-only file system
<__monty__> You usually want 'super.callPackage' not 'self.callPackage', fyi.
<Joestar79> __monty__ thank you, changed that but I still get the same error
<Joestar79> should I just create that /share dir before darwin-rebuild switch ? if yes, I'm not sure where exactly though
<__monty__> Are you on Catalina? This sounds to me like a consequence of the locked down /.
<Joestar79> unfortunately yes, I'm on Catalina
<Joestar79> any ideas or possible workarounds?
<__monty__> I'm not familiar with catalina no. I'm sure someone'll be able to help. Can't you make it use a different directory?
<Joestar79> I really have no clue
<Joestar79> let me check the .nix files I checked out and see if they mention /share anywhere
<Joestar79> hmm mkdir -p $bin/share/bash-completion/completions
<LnL> nix builds can't write to /share regardless of the platform
<LnL> yeah I figured something like that, with $bin being empty instead of the bin output
<LnL> does the expression declare outputs?
<Joestar79> those are wrapped in a postInstall
<Joestar79> $bin/bin/helm completion bash > $bin/share/bash-completion/completions/helm
<Joestar79> LnL: I don't know what to answer to your last question to be honest
<LnL> nix-instantiate --eval '<nixpkgs>' -A hello.outputs
<Joestar79> [ "out" ]
<LnL> well with the correct package that is
<Joestar79> I think I lost you
<Joestar79> so basically it doesn't have the permission to write stuff in /usr/share dire?
<Joestar79> should I just comment the postInstall thing and live without autocompletion of manually adding it later somehow?
<Joestar79> *or
<Joestar79> I just commented the postInstall and it worked
<LnL> it's trying to write to the dev output not /, dev shouldn't be empty
<LnL> or the build instructions are not correct
<Joestar79> well, the build instruction should be correct I guess. I took them from a past commit on the nixpkgs repo
<LnL> if the command I mentioned earlier doesn't include dev in the outputs for helm then it won't work
philr_ has quit [Ping timeout: 256 seconds]
<Joestar79> ah ok, thx LnL for the clarification
<Joestar79> how can I add dev then?
<Joestar79> out
<Joestar79> nice
<Joestar79> thanks
<LnL> specifying eg. outputs = [ "bin" "out" ]; would also work
<LnL> by default nix packages only are a single output out where the build can write to
<LnL> but sometimes it's useful to split a package up into multiple parts so a user using the binary doesn't have to pull in all the headers, etc.
<LnL> so in that case the build gets 2 random store paths it can write to instead of just the one
<Joestar79> hmm I tried using $out instead of $bin and then using outputs = [ "bin" "out" ]; but it still fails
<Joestar79> this is the error: /nix/store/yd7798v1xb0hf07jrs3y5ypjj37nnylg-stdenv-darwin/setup: line 93: /nix/store/f55nmls9jldsbwxxaw7v5aamifqzpag8-helm-2.15.1-bin/bin/helm: No such file or directory
<Joestar79> I used $bin and added: outputs = [ "bin" "out" ];
<Joestar79> but also just renaming $bin to $out fails as well
<LnL> I'm guessing just adding bin isn't enough because the build isn't moving the binary there anymore either
<Joestar79> let's say I'd want to add this to nixpkgs, maybe just locally -> https://github.com/moby/hyperkit
<Joestar79> how'd I proceed?
<__monty__> Generally, you write a default.nix that builds the project and you use an overlay to add it to your nixpkgs.
<__monty__> Browsing the repo for some previously packaged opam packages can help get you started.
<LnL> we have xhyve so that's probably a good starting point
<Joestar79> ok, thank you guys
<LnL> kind of surprised it's not there already, does the linux builder thing still use xhyve?
<Joestar79> I installed it and tried to build the example, but I'm getting: error: a 'x86_64-linux' with features {} is required to build '/nix/store/0w6pl11qhy3qgn7z0s5gxd51y8jnsvpy-hello-1592237239.drv', but I am a 'x86_64-darwin' with features {benchmark, big-parallel, nixos-test}
<Joestar79> I ran this: nix-build /Users/stondo/.cache/nix-linuxkit-builder/example.nix
<Joestar79> if I edit the file and put darwin instead of linux, it works
<Joestar79> but still how does help with hyperkit not being on nixpkgs?
<LnL> that's a functional hyperkit build so you can base it on that
<Joestar79> ah ok, the .nix I'm gonna create will use that as a builder, right?
<LnL> you can probably copy that folder next to xhyve and add an entry for it to all-packages.nix
<Joestar79> I've been using Nix for less than a week, so I'm sorry if I'm slow to understand the help you guys are giving me. But I do appreciate a lot all of the info u guys are sharing, thanks!
<__monty__> Fwiw, reading the manuals front to back does help clear many things up.
<LnL> maybe, but to be fair that's not really 'reading' material
<LnL> the manual is mostly a reference guide
<__monty__> I didn't make any enjoyability claims : )
<LnL> and the nix pills are an intermediate introduction to how the internals stdenv
<__monty__> I'm not familiar with the use of stdenv as a verb.
<LnL> what did I type there... :p
ncl has quit [Ping timeout: 240 seconds]
Chiliparrot has joined #nix-darwin
ncl has joined #nix-darwin
Joestar79 has quit [Quit: Textual IRC Client: www.textualapp.com]
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Client Quit]
philr_ has joined #nix-darwin
__monty__ has quit [Quit: leaving]
<mitchellh> QQ: I'm setting `environment.shells` and it is not having any effect. Where should I debug? (The exact value is `environment.shells = [ pkgs.fish ];`
<mitchellh> nvm
<mitchellh> > warning: not linking environment.etc."shells" because /etc/shells exists, skipping...
<{^_^}> error: syntax error, unexpected ',', expecting ')', at (string):316:73
<mitchellh> obviously
<LnL> yeah, it's a bit (overly?) careful not to mess up system files
<LnL> I'm also not entirely sure how well certain thinks like that deal with potentially having a broken symlink before the volume is mounted
abathur has quit [Read error: No route to host]
abathur has joined #nix-darwin
mbrgm_ has joined #nix-darwin
mbrgm has quit [Ping timeout: 256 seconds]
mbrgm_ is now known as mbrgm