<clever>
plakband: you can also use nix and haskell together on OSX if you want to
<clever>
ok, try `nix-instantiate -v default.nix` into a log file, and gist the entire thing, as a file, not a comment
<clever>
mitchty: what is the content of your config.nix file?
<clever>
you somehow refers to the 2048 game, which is linux only
<clever>
Package ‘2048-in-terminal-2015-01-15’ in /Users/mitch/src/github.com/NixOS/nixpkgs/pkgs/games/2048-in-terminal/default.nix:25 is not supported on ‘x86_64-darwin’, refusing to evaluate.
<clever>
run "gist -p default.nix" and then it will upload the entire file for you
<clever>
your file doesnt have that
<clever>
line 1 of that file brings everything into scope
<clever>
as well as everything in the buildInputs
<clever>
that should fail because both stdenv and buildEnv are not in scope
<clever>
and the gist includes the exact contents of default.nix?
<clever>
that should fail with a very different error
<clever>
does a shell.nix file also exist in that directory?
<clever>
what directory did you run that in?
<clever>
what args did it give to nix-build?
<clever>
mitchty: what command did you run to build that file?
<clever>
math*
<clever>
__Sander__: yep, the path result matches Double in javascript
<clever>
__Sander__: nodejs doesnt handle large numbers sanely
<clever>
ah, yeah, your going to run out of storage first
<clever>
sphalerite: is the nix limit 32bit or 64bit?
<clever>
then look under the sw/bin/ of each
<clever>
radvendii: ls -ld /nix/var/nix/profiles/system*
<clever>
they already have dmg, which is just a disk image
<clever>
and if you try to run the directory, it runs a certain special executable inside it
<clever>
so natively, its just a directory, but every single GUI claims its a file, and moves the whole thing as 1 unit
<clever>
apple did similar things, by treating a .app directory as if it was a file
<clever>
so you could mmap executable code directly into the application
<clever>
its also possible to flag certain files as not compressed
<clever>
(but is limited to http like things)
<clever>
bgamari: there is also nix-prefetch-url '<nixpkgs>' -A hello.src, which just evaluates the .src.url and then runs normal prefetch-url on it
<clever>
bgamari: that will run the fixed-output derivation for fetching the source, then hash its result, and rename the result in /nix/store/ to match the actual hash, so the data isnt lost
<clever>
bgamari: nix-build -A hello.src --hash
<clever>
prefetch-url only works against urls
<clever>
bgamari: something better/more powerful
<clever>
bgamari: yeah, there is a special mode, let me find it
2017-12-14
<clever>
ive wanted to switch it to the c one, which still has the same api
<clever>
it was perl, but nixUnstable de-perl'd nix
<clever>
nix-env and nix-channel need a buildEnv to manage the nixpkgs download
<clever>
its always been in nix
<clever>
Lisanna: there are 2 copies of buildEnv and they have begun to diverge some
<clever>
Lisanna: buildEnv has also been rewitten in c, in nix
<clever>
symphorien: i believe the limit is 256 characters, including the "privmsg #nixos :" prefix and the "\n" suffix
<clever>
srhb: missing a '
2017-12-13
<clever>
i'm using nix as a templating language for haskell
<clever>
gchristensen: line 175 is not template haskell
<clever>
one trick ive been using recently, is to create a custom set within config.nix, and then nix-env -i that whole set
<clever>
config.nix on the other hand, is just some overrides that apply to nixpkgs by default, to mutate the packages before nix-env even starts the build
<clever>
dshin: every time you nix-env -i or nix-env -e, it will load the manifest.nix into ram, apply the requested mutations, then generate a profile based on the new manifest.nix
<clever>
iqubic: and what will the script do?
<clever>
iqubic: boot, graphic login, any shell opening, any login shell?
2017-12-12
<clever>
yeah
<clever>
mekeor: so only channels added by root are visible via the search path
<clever>
mekeor: thats just the default value
<clever>
mekeor: what is $NIX_PATH ?
<clever>
yeah
<clever>
chreekat: randomEncryption.enable would also be an option, that formats the swap partition every time, without trying to set the size
<clever>
then 201 formats
<clever>
line 197 tries to shrink the file, but stat wrongly claimed the original size was 0, so it never shrinks
<clever>
as long as the size you specified is less then (or equal) to the block device, it will succeed
<clever>
which just writes to the "tail" end of the swap device
<clever>
so it thinks fallocate isnt supported, and tries to use dd
<clever>
ah, stat thinks the swap device is 0 bytes, so it tries to extend the file with fallocate, which fails
<clever>
then it will format it with mkswap
<clever>
chreekat: if the swap (device|file) doesnt exist, it will create it, and try to use dd/fallocate/truncate to set the size
<clever>
k0001: fetchzip just calls the normal unpackFile command that stdenv uses, it was originally meant for non-deterministic zip's, to hash the contents, rather then the zip itself
<clever>
k0001: fetchzip will automatically unpack, and i think it supports both tar and zip
<clever>
k0001: and what does fetchzip do?
<clever>
k0001: any reason you cant use a fetch function frin nixpkgs?
<clever>
LnL: also, silly java is throwing a FileNotFoundException, with a message of no space left on device, lol
<clever>
maybe next time, i'll leave /nix/var on the / dataset, and use /nix/store/ for the non-snapshot one
<clever>
/nix is the only thing not covered, because the snapshots make GC useless, and it can always be rebuilt
<clever>
and also for error recovery after an improper shutdown, it never does in-place edits on things like a directory listing
<clever>
except /nix itself
<clever>
LnL: i have snapshots on everyting
<clever>
LnL: the only way out is to manualy destroy a snapshot, then GC can work
<clever>
LnL: because it has to create a new version of the directory without that file
<clever>
LnL: zfs is immutable, you need free space even to delete a file
<clever>
so hard that i cant even garbage collect
<clever>
hydra started to build ghc, and i ran out of hdd space entirely
<clever>
oh, thats why my browser has been acting wonky
<clever>
:D
<clever>
jeaye: so you could refer to that perl script in the shellHook for the nix-shell env
<clever>
jeaye: the runner script has zero involvement in systemd
<clever>
jeaye: that will generate a perl script, that will handle pre/post start, start, and pre/post stop
<clever>
jeaye: create a configuration.nix that fully describes the service you want to enable, then build this, nix-build -I nixos-config=./configuration.nix '<nixpkgs/nixos>' -A config.systemd.services.postgresql.runner
<clever>
jeaye: there is also the service runner script, one minute
<clever>
there are comments in the fetchgit source explaining it
<clever>
Lisanna: its a security thing, to protect deleted branches i think
<clever>
Lisanna: the root problem, is that the git protocol doesnt allow you to fetch a given sha1, you must fetch a branch
<clever>
bbl
<clever>
so thats also an option
<clever>
cement: if he simply creates /nix and chown's it to your user, nix will install without ever needing root
<clever>
Judson: and without systemd/udev, you have to configure everything yourself
<clever>
Judson: it boots with sshd, but it doesnt really have much installed
<clever>
Judson: its mostly as an example of how to boot something that was built with nix
<clever>
sphalerite: ah, that sounds like a good use for not-os
<clever>
verticle splits, and being able to sometimes control what a remote viewer sees
<clever>
there are only 2 things tmux has that i want in screen
<clever>
srhb: oops, ^^^
<clever>
sphalerite: and what about moving the bottom split into its own terminal?
<clever>
sphalerite: ^a5 is simpler
<clever>
without having to disconnect and connect to a new session
<clever>
srhb: i want to dynamically change what i see in each terminal, depending on the situation
<clever>
all viewers must always see the same thing
<clever>
tmux cant mux!!
<clever>
i have 5 terminals open with screen, each showing a different buffer
<clever>
another major difference/anoyance
<clever>
screen has ^aF to force it to fit the viewer using that hotkey
<clever>
tmux forcibly fits the smallest viewer, and doesnt have any bypass
<clever>
and if the buffer is bigger, it has to redraw the entire screen as it pans
<clever>
but if the buffer is smaller, it has to track the column, and insert control characters to sek a lot
<clever>
Judson: if the sizes match up, screen/tmux can just relay the bytes directly to the terminal, and its fast
<clever>
Judson: also, there is a massive cpu hit if the buffer doesnt match the screen size
<clever>
but it only auto-resizes if there is only 1 terminal focused
<clever>
Judson: i connect to screen from many terminals and many computers
<clever>
so you can de-focus all buffers, without actually disconnecting
<clever>
screen also has a - buffer, that just shows nothing
<clever>
i dont use a tiling window manager, so all tiling happens within screen
<clever>
sometimes i want to see 2 things at once, sometimes i want the editor to take 100%, without closing the 2nd thing
<clever>
and i'm constantly re-organizing what things go in which split
<clever>
for tmux, the splits are inside the buffer
<clever>
for screen, the splits are at a seperate level, and each buffer can switch to any tab
<clever>
or swapping the windows within splits
<clever>
and tmux seems to lack some basic features like forcibly resizing the window when others are viewing
<clever>
i learned screen first, and now all the keybinds are muscle memory
<clever>
i havent used direnv, and i prefer screen over tmux
<clever>
ah
<clever>
?
<clever>
you could always download the default.nix for the package and nix-env -f default.nix -i
<clever>
rather then impure linux actions
<clever>
ah, i was thinking more about a generic linux build slave
<clever>
and the docker image itself can be build with nix
<clever>
the darwin host will copy things into the container again at the next build
<clever>
you could even launch it with `docker run --rm` so the store is lost at shutdown
<clever>
yeah, i would make a persistant container with sshd and nix-daemon, that just acts as a dumb build slave
<clever>
crucialrhyme: it might be able to just convert the docker images
<clever>
'The Singularity software can import your Docker images without having Docker installed or being a superuser.'
<clever>
so you can pipe that directly into `docker load` and not even need nix
<clever>
crucialrhyme: lines 153-158 are an extra bit to make it hydra friendly, you now have a simple download image link on https://hydra.iohk.io/build/56778
<clever>
manveru: in theory, you could run a nix build slave, under docker...?
<clever>
crucialrhyme: this generates a docker image containing the entire closure of cardano-state (defined on lines 111-139)
<clever>
crucialrhyme: nixpkgs also has docker utils, one minute
<clever>
crucialrhyme: then i can work on each stage seperately, and if i find a bug in an early stage, nix will automaticaly re-run all stages in the right order
<clever>
crucialrhyme: i have also been using nix for a lot of data processing tasks, i split each stage of processing into its own nix derivation, one to parse the data into a db, one to sort, filter, and print latex, another to turn the latex into a pdf
<clever>
its more an issue about using qt-app-1 from 5 months ago, with qt-app-2 from yesterday
<clever>
so no conflict can exist
<clever>
crucialrhyme: installing them globally in configuration.nix would also fix it, because then they always come from the same nixpkgs, and the same QT version
<clever>
crucialrhyme: hmmm, not sure if it would find the libs at all then
<clever>
crucialrhyme: the only solution ive found is to upgrade both apps, so they are on the same QT version
<clever>
crucialrhyme: QT expects to find some of its libs in a place like ~/.nix-profile/lib/ and if you install apps from 2 different qt versions, they break eachother
<clever>
crucialrhyme: it is with QT based apps
<clever>
hyper_ch: more for seeing if a program is even worth using and keeping long-term
<clever>
manveru: even after removing it from nix-env, the rollbacks keep the package around for ages
<clever>
manveru: i tend to test things with nix-shell
<clever>
then all the users on the wrong channel came out of the woodwork :P
<clever>
the nixos channel didnt update, because the testing caught it and blocked the channel
<clever>
hyper_ch: there was also a bug a year ago in the nixpkgs channel (not the nixos channel), that corrupted the grub.conf file
<clever>
if /nix/var/nix/db/db.sqlite is deleted, you basically have to start over