2020-02-03

<clever> the script would run electron, on the js
<clever> yeah
<clever> you could delete the elf, and reuse the ones from pkgs.electron
<clever> that .deb contains both js and elf files
<clever> then the pre-patched electron in nixpkgs will load the JS, and you can just delete all of the ELF files
<clever> i077: just use `cat <<EOF > $out/bin/todoist` to generate a shell script, that will run ${electron}/bin/electron on the directory with the package.json
<clever> nope
<clever> lddtree shows that better
<clever> i077: so you may need to --set-rpath every .so in the package
<clever> i077: if a .so file shipped with this package opens pulse, that .so must have the rpath fixed also
<clever> i077: how does it fail? what happens if you use ${electron}/bin/electron instead of trying to patchelf the one they ship?
<clever> then you start running into nixos-rebuild issues, and discovering reproducability problems in places you wherent looking, lol
<clever> xelxebar: you can also set `repeat = 1` in nix.conf, and then it will just always repeat every build
<clever> bhipple: --check only repeats a single thing, while --repeat 1, would check every single dependency as well
<clever> bhipple: and if the builds produced different results, nix throws out all results and considers it a failure
<clever> bhipple: nix also has a repeat option in nix.conf, to make it repeat every build N more times
<clever> and then you can unpack the tar to / and boot
<clever> thats used to generate a tar file, containing the entire closure of a store path
<clever> time tar --sort=name --mtime='@1' --owner=0 --group=0 --numeric-owner -c * $extraArgs | $compressCommand > $out/tarball/$fileName.tar${extension}
<clever> and nar requires that all files in a dir be sorted by name
<clever> nar just lacks things that can be a problem, like timestamps and uid, or the write bit, stuff nix doesnt allow in /nix/store
<clever> xelxebar: cache.nixos.org ises nar files, not tar files
<clever> and then query cache.nixos.org to see if it has that path
<clever> your meant to eval a nix expr from nixpkgs, to compute what path you want
<clever> not really

2020-02-02

<clever> astk: i too have broken scp by leaving echo's like that in place
<clever> 2020-02-02 17:14:57 < clever> astk: try both .bashrc and .bash_profile, and maybe add an echo to them temporarily, to confirm they even run, and when
<clever> sondr3: you need to set the env var CI to anything, and then complain to them that its not pure :P
<clever> that would be the problem
<clever> sondr3: does overlay.nix do anything with builtins.fetchGit?
<clever> bash will insert the right value for you, where the ~ is
<clever> astk: vi ~/.bashrc
<clever> astk: your editing /.bashrc not ~/.bashrc
<clever> astk: your not in the home folder
<clever> astk: what does `pwd` output?
<clever> astk: can you pastebin the output of `ls -ltrha` ?
<clever> how did you edit .bashrc and .bash_profile ?
<clever> definitely using bash on the remote end
<clever> astk: that shouldnt be happening...
<clever> astk: what about `ssh user@host 'ps aux | grep $$'` ?
<clever> astk: try .bash_profile then
<clever> so the remote bash has to do things
<clever> the single quotes stop the local bash from parsing it
<clever> you want 'echo $PATH'
<clever> astk: thats printing the local path, not the remote path
<clever> astk: how does it not work?
<clever> astk: it should do `export PATH=~/.nix-profile/bin:$PATH` as you asked earlier
<clever> astk: then create a .bashrc in home
<clever> you want to edit .bashrc in the remote home folder
<clever> the home folder, on the remote machine
<clever> astk: are you editing the one in the home folder?
<clever> astk: try both .bashrc and .bash_profile, and maybe add an echo to them temporarily, to confirm they even run, and when
<clever> astk: bash will run different files for login and non-login shells, so you must have ssh directly run nix-store
<clever> astk: you can test that .bashrc was done right with `ssh user@host nix-store --version`
<clever> yeah
<clever> astk: the .bashrc on the remote end, must put ~/.nix-profile/bin/ into $PATH
<clever> astk: when you run ssh-agent, you must set the env vars it prints, to the values it prints
<clever> astk: ssh-agent must be ran on the local machine, not the remote machine
<clever> astk: launch ssh-agent, and run `ssh-add key.pem`, then you can copy
<clever> astk: i would just use an ssh agent
<clever> if its a single-user install, you can ssh into that user, instead of root
<clever> astk17: you only need nix, so you could just use the curl script to install it
<clever> astk17: it should now be in /root/.nix-profile/bin/something
<clever> astk17: nix-copy-closure --to root@1.2.3.4 ./result && ssh root@1.2.3.4 nix-env -i $(readlink result)
<clever> astk17: but you can do `nix-build something.nix && ./result/bin/something` to iterate
<clever> astk17: you can run result/bin/something to execute binaries within it
<clever> astk17: after you run nix-build, there will be a result symlink pointing to the result
<clever> astk17: you can also use `haskellPackages.callCabal2nix "name" ./. {}` to do that for you
<clever> astk17: if you are using haskell, you must use haskellPackages.callPackage on the file cabal2nix generated
<clever> astk: with import <nixpkgs> {}; stdenv.mkDerivation { name = "name"; src = ./.; }
<clever> astk: that file within the nixpkgs repo
<clever> > pkgs.hello.meta.position
<clever> > pkgs.hello.meta.location

2020-02-01

<clever> it also shows the help command on startup
<clever> a few months back, somebody in here said the same thing, "its as hard to exit as vim", then he realized it was identical
<clever> (you exit the exact same way, :q )
<clever> hyper_ch: its as hard to exit as vim!
<clever> hyper_ch: if you tab-complete `linuxPackages` under `nix repl '<nixpkgs>'` what do you find?
<clever> that explains it
<clever> ah
<clever> i think i'm helping too many people at once? lol, i cant remember i helped you with
<clever> thefloweringash: if the squashfs is put on disk rather then held in ram, not-os probably could
<clever> NoctisLabs: not-os
<clever> philipp[m]: in this specific case, you can use patchelf entirely without nix being involved
<clever> philipp[m]: but, upstream, they could have used patchelf to bake that LD_LIBRARY_PATH into the binary, and then it would work on every system, without the script
<clever> philipp[m]: yeah, with steam in the mix, you generally want the fhs wrappers
<clever> philipp[m]: patchelf can also be relative to the binary, so it should fix it even outside of nix
<clever> philipp[m]: patchelf can entirely eliminate that
<clever> MmeQuignon: i dont know why, but modern games like portal 2 run perfectly fine, but ancient games like the original half life, have horrible audio repeating

2020-01-31

<clever> so i'm constantly having to throw an `echo ` at the start of a cmd, just to be able to complete filenames
<clever> gustavderdrache: my problem, is that i try to complete `nix-env --profile /nix/var/nix/profiles/system` and it wont let me, because the author doesnt know all of the edge-cases
<clever> heh
<clever> gustavderdrache: i tend to find the completions a bigger hinderance, it stops me from completing perfectly valid commands, because i know the command better then the author of the completion code
<clever> evanjs: so nix has to unpack, and hash the contents, rather then the zip itself
<clever> evanjs: which breaks nix's hashing
<clever> evanjs: the reason its called fetchzip, is that a lot of websites auto-generating a zip for dl, include timestamps in the zip metadata
<clever> evanjs: the name is misleading, it fetches anything, then runs the unpackPhase to $out, and adds zip support to the unpackPhase
<clever> evanjs: pkgs.fetchzip with a postUnpack i'm thinking
<clever> that might be it
<clever> that are bash related
<clever> gustavderdrache: do you see things in ~/.nix-profile/etc/ ?
<clever> ,locate
<clever> kiloreux: nix-locate is about all you can use then, to search for any package that contains font files
<clever> kiloreux: i just tab-complete that kind of thing under: nix repl '<nixpkgs>'
<clever> ,cache anohigisavay

2020-01-30

<clever> Shoubit: your better off using mkIf and a custom option, to allow not setting it
<clever> Shoubit: mkForce would undo all other things setting it, likely breaking many things
<clever> rihardsk[m]: and then use the result of runCommand as your src=
<clever> rihardsk[m]: yeah
<clever> rihardsk[m]: not use submodules? compose it back together with runCommand?
<clever> Raito_Bezarius: what does `--show-trace` output?
<clever> Raito_Bezarius: there is the builtins.trace function, which you can insert anywhere in your code
<clever> knupfer: raboof (pkgs.enableDebugging pkgs.firefox-unwrapped).override { debugBuild = true; }
<clever> raboof: cant hurt
<clever> peelz: it swaps out the stdenv, for one that enables debug
<clever> 446 enableDebugging = pkg: pkg.override { stdenv = stdenvAdapters.keepDebugInfo pkg.stdenv; };
<clever> 445 # intended to be used like nix-build -E 'with import <nixpkgs> {}; enableDebugging fooPackage'
<clever> nix-repl> pkgs.enableDebugging
<clever> «lambda @ /nix/store/1pk5kg89rijpnnihldyl98xdxzrk6gkp-nixos-19.09.1772.54c9e1f53a7/nixos/pkgs/top-level/all-packages.nix:446:21»
<clever> raboof: you want to use an expr like this
<clever> > pkgs.enableDebugging pkgs.firefox-unwrapped
<clever> the os will be using some ram, which you cant test
<clever> peelz: any test under an os, is not going to be a proper test
<clever> peelz: you can also just burn a memtest iso, and boot that
<clever> peelz: ive not had a chance to test it locally, so i dont know how diff it behaves
<clever> peelz: last i checked, memtest doesnt support efi
<clever> peelz: you want to double-check efibootmgr -v
<clever> peelz: its likely smart enough to check if the files are already up to date
<clever> peelz: `ls -ltrh /boot/` and look at what dir was recently modified, or named similar to systemd
<clever> and look at the generated config in /boot to see what its doing
<clever> yeah, you can try that
<clever> grub config is just more powerful
<clever> i prefer using grub at all times
<clever> yeah
<clever> peelz: boot.loader.systemd.enable
<clever> peelz: is systemd enabled in configuration.nix?
<clever> the bios should also give a ui to change the order
<clever> peelz: and try to select linux boot manager, from the bios
<clever> peelz: na, just leave it as-is
<clever> peelz: that looks like systemd
<clever> strings and file are fine
<clever> yeah
<clever> anything you use on a daily basis, that isnt directly involved in compiling
<clever> so i can then just install "stuff" and get just those 2 programs
<clever> peelz: strings is part of binutils, but i really dont want compile-time tools installed globally, so this will copy out just strings and readelf
<clever> ,libraries peelz
<clever> the stdenv isnt installed globally
<clever> its in the default stdenv
<clever> peelz: `nix-shell -p`
<clever> and/or strings
<clever> entry 7 i'm not sure, run `file` on that .efi file
<clever> both grub and systemd will give a menu
<clever> not sure
<clever> peelz: it will do grub first, and then try systemd next
<clever> peelz: oh, look at the boot order
<clever> peelz: yeah, that looks good
<clever> peelz: and what did efibootmgr show?
<clever> at this path within the partition
<clever> -rwxr-xr-x 1 root root 120320 Dec 23 04:39 /boot/EFI/BOOT/BOOTX64.EFI
<clever> this one
<clever> [root@system76:~]# blkid /dev/nvme0n1p1
<clever> /dev/nvme0n1p1: UUID="7DBC-2698" TYPE="vfat" PARTUUID="27c99b08-455d-4dfe-a44f-6150cbc09ef8"
<clever> this says to look on a given partition
<clever> Boot0004* UEFI OS HD(1,GPT,27c99b08-455d-4dfe-a44f-6150cbc09ef8,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
<clever> peelz: probably nixos, but you should also see the partition uuid and path to the .efi file
<clever> but its not an option currently
<clever> the nix code within nixos could be modified, so it would do that
<clever> nixos could be modified to do that
<clever> peelz: yes
<clever> peelz: but nixos cant magically know that, and you need to chooe to install it
<clever> peelz: because you may not be using efi
<clever> peelz: first, you must run `efibootmgr -v` and see if systemd is listed there

2020-01-29

<clever> astk99: yep
<clever> astk99: it does exactly what you want
<clever> 2020-01-29 14:46:26 < nh2> astk_: yes, the `doJailbreak` function
<clever> 2020-01-29 14:56:39 < srk> astk96: haskell.lib.doJailbreak (haskellPackages.call...)
<clever> astk99: are you using doJailbreak?
<clever> charukiewicz: persistent-mysql = haskell.lib.dontCheck super.persistent-mysql_2_10_2_2;
<clever> charukiewicz: you want haskell.lib.dontCheck, // wont work
<clever> astk_: yep
<clever> astk_: replace `haskellPackages` with `haskell.packages.ghc881`
<clever> astk: i think we want to ask #haskell about the error
<clever> so thats not it
<clever> for me, i used ghc 8.6.5
<clever> oh, one sec...
<clever> astk: nixos wont have a ghc in $PATH by default
<clever> astk: thats a haskell question, ghc-pkg does that on every os
<clever> astk: what is the 2nd string of garbage, after the + char?
<clever> ive never seen haskell do it in this weird way before
<clever> yeah, thats weird
<clever> nix will build all deps automatically for you
<clever> and i can describe it...
<clever> [nix-shell:~/apps/rotateDistributed/rotateDistributed]$ ghc-pkg describe rotate
<clever> astk: this does see a rotate-0
<clever> [nix-shell:~/apps/rotateDistributed/rotateDistributed]$ ghc-pkg list
<clever> [clever@system76:~/apps/rotateDistributed/rotateDistributed]$ nix-shell -A rotateUse.env
<clever> astk: i just cloned master
<clever> astk: i can reproduce your error on nixos
<clever> astk: i think it does
<clever> WinchellsM: in my case, its an installer that does more complex stuff, but it can also just be a simple program
<clever> WinchellsM: this line will generate a bundle that contains ${installer} and will run ${installer}/bin/installer when ran
<clever> astk: can you pastebin the full error?
<clever> WinchellsM: ive only used nix-bundle via nix-build, not the nix-bundle.sh script
<clever> WinchellsM: one min...
<clever> WinchellsM: yes
<clever> astk: that will give nicer progress information
<clever> astk: oh, you can also use `nix build -f . rotateUse`
<clever> and some of them have been renamed, causing errors
<clever> astk: if you dont use `-A rotate`, then your telling nix to build every single package on hackage
<clever> astk: oh, and you want to use `nix-build -A rotate`
<clever> astk: you need to edit the .cabal file in rotate, to depend on haskell-ci, not multi-ghc-travis
<clever> repeat on 6&7
<clever> astk: add that on line 2, then use "${rotate}/rotate" on line 5, instead of ./rotate
<clever> astk: let rotate = fetchFromGitHub { owner = "owner"; repo = "repo"; rev = "sha1"; sha256 = "hash"; }; in
<clever> astk: also, you can make this nix code fetch rotate for you
<clever> astk: your missing the config. in there
<clever> 2020-01-29 12:54:49 < clever> with import <nixpkgs> { config.allowUnfree = true; };
<clever> astk: can you paste the full error message?
<clever> astk: how does it not work?
<clever> astk: the guest network may need to be bumped (or just fully reboot) when changing the mode
<clever> astk: i try to limit the vm to a single adapter, but i do sometimes change what mode its in (bridged or nat)
<clever> astk: i do have experience with using virtualbox
<clever> astk: i think fixing virtualbox is going to be simpler
<clever> only if you make the file from within WSL can it be seen by WSL
<clever> explorer also destroys the tag when copying files (the copy wont have it)
<clever> oh, and i heard that WSL can only see files that have a special tag, and explorer has no way to create that tag
<clever> astk: WSL has its own root dir
<clever> with import <nixpkgs> { config.allowUnfree = true; };
<clever> change this line to:
<clever> with import <nixpkgs> {};
<clever> astk: oh, but if your basing it on my machotool, it wont accept that config arg
<clever> then it will directly use that value, and not need a config.nix file
<clever> astk: you can always override it with `--arg config '{ allowUnfree = true; }'`
<clever> astk: then its definitely not reading that file
<clever> astk: what happens if you delete the } at the end and try again?
<clever> astk: what path is it at?
<clever> config.nix*
<clever> astk: the error tells you where config.txt
<clever> astk: nix-build doesnt read the global configuration.nix, only the per-user config.nix
<clever> xa0[m]: propagated inputs only applies at build time
<clever> xa0[m]: baz will behave like it had buildInputs [ foo bar ];
<clever> xa0[m]: if foo has bar in the propogatedBuildInputs, then baz depends on foo, baz gets bar automatically
<clever> astk: you can also do `./rotate`, the rule is that it must not end with a /
<clever> xa0[m]: nativeBuildInputs is for the host, buildInputs is for the target
<clever> the machotool example is loading 2 cabal files to do that
<clever> astk: nixpkgs on its own doesnt support cabal.project, i prefer to use an overlay to load each .cabal file and merge them all together
<clever> astk: `callCabal2nix "rotate" ./.` will look for `rotate.cabal` in `./.`
<clever> astk: when using an overlay, you would do `rotate = self.callCabal2nix "rotate" ./ {};`
<clever> astk: you want ./.
<clever> 2020-01-29 12:07:18 < astk> nixpkgs.haskell.packages.822.callCabal2nix "rotate" ./ {}
<clever> astk_: WSL is a linux api, to let you run unmodified linux programs on windows
<clever> astk_: and at that point, your better off using proper linux
<clever> astk_: so you would then need a windows->linux cross-compiler
<clever> astk_: nix does sorta work on windows, but that would then produce windows binaries as a result
<clever> astk: there is a virtualbox image available with nixos pre-installed
<clever> magnetophon: the nixos-option command can also be used, but it doesnt work well with multi-line stuff
<clever> magnetophon: line 71, you open a doublequote and never close it
<clever> magnetophon: line 55, we can see the ''') turned into '')
<clever> magnetophon: though your code isnt there, which interactiveShellInit did you set?
<clever> magnetophon: now we can see what the result of running the nix code is, with all the vars and escaping undone
<clever> magnetophon: and then pastebin what it outputs
<clever> magnetophon: try running this
<clever> [root@system76:~]# nix-instantiate --eval '<nixpkgs/nixos>' -A config.programs.bash.interactiveShellInit --json | jq -r
<clever> magnetophon: one sec
<clever> magnetophon: pastebin doesnt know what nix is, so its getting upset over that part
<clever> though in this case, its a giant blob of bash, so its not that much better
<clever> magnetophon: https://gist.github.com/cleverca22/0b5f850823123d404363ccb681cd7109 gist also supports the nix syntax, and highlights it a bit better
<clever> magnetophon: sure
<clever> magnetophon: ah, then just re-order the functions within that string
<clever> magnetophon: you can use mkBefore and mkAfter in nix, to control what order things get emited, if your assigning interactiveShellInit several times
<clever> magnetophon: check what order they appeared in, within the generated files
<clever> magnetophon: it depends on what type of string your inside
<clever> ,escape''
<clever> ,escape"
<clever> b7j0c: nix-shell -p 'perl.withPackages (ps: [ ps.JSON ])'
<clever> b7j0c: you probably also want to use nix-shell, not nix-env
<clever> b7j0c: install `perl.withPackages (ps: [ ps.JSON ])` instead of perl + json
<clever> b7j0c: you must use perl.withPackages to merge the libraries into the main perl
<clever> noonien: nix wont allow a path to exist without its deps though
<clever> noonien: you just give it a list of things you want in the squashfs, and it figures out the closure for you
<clever> noonien: this will generate a squashfs
<clever> 70 };
<clever> 69 storeContents = config.netboot.storeContents;
<clever> 68 system.build.squashfsStore = pkgs.callPackage ../../../lib/make-squashfs.nix {
<clever> noonien: one minute
<clever> noonien: why do you need the dependency listing?

2020-01-28

<clever> drew_b: just dont run the push command?
<clever> drew_b: cachix only pushes if you run the push command within cachix
<clever> drew_b: if cachix is configured correctly, and you use the same nix expressions, nix-shell will download what it can from cachix
<clever> grin[m]: nixos-rebuild would modify the livecd env, and be lost at shutdown
<clever> grin[m]: when using the iso, you want to be using nixos-install only, not nixos-rebuild
<clever> grin[m]: are you starting from a pre-made virtualbox image or an iso file?
<clever> grin[m]: nixos-install is basically a script that runs nixos-rebuild, inside a chroot
<clever> grin[m]: nixos-rebuild reads /etc/nixos/configuration.nix and is meant to update the currently running nixos (mounted at /)
<clever> grin[m]: nixos-install reads /mnt/etc/nixos/configuration.nix, and is meant to build a copy of nixos currently mounted in /mnt/