[resolved] Help with haskell package that lives in a subdirectory of `src`
  • gomp gomp 2d ago 100%

    In case anyone comes here with the same problem, the solution is:

    attoparsec-aeson = haskellPackages.mkDerivation {
      ...
      postUnpack = ''
        mv source source-aeson
        cp -rL source-aeson/attoparsec-aeson source
        rm -fr source-aeson
      '';
      ...
    };
    ```*___*
    1
  • Free Software Is Under Attack! (Will You Help Defend It?)
  • gomp gomp 3d ago 85%

    It's a guy babbling about an anonymous website with the same-old stuff against Stallman, and how that is part of a conspiracy to harm free software.

    I watched it (most of it) despite having formed my opinion on the quality of that DistroTube channel a while ago... you might want to be wiser than me and do something else with your time.

    PS:

    Before you put me in the pro-Stallman faction, let me clarify that I think the FSE (non the FSFe - BTW you should change your name guys) is largely irrelevant and so I've never investigated the allegations to Stallman enough to take a stance pro or against: I do not care.

    5
  • Open-sourcing of WinAmp goes badly as owners delete entire repo
  • gomp gomp 4d ago 100%

    I must say, this whole shitshow has been pretty funny to watch :)

    37
  • [Solved] This maybe a strange question but can I run a Linux app in a separate container/sandbox? Without its dependencies bloating my host OS?
  • gomp gomp 7d ago 100%

    One way or another, if you want to run an application you are gonna need its dependencies (the key is the name)... they may be bundled into an appimage or come as part of flatpak ruintime, or be confined inside a container, or live in the nix store, but they will "bloat" your system anyway.

    Learn how to cleanup your system (ie. uninstall all packages that are not needed by others that have been requested explicitly) and live a happy life. Only bother with other solutions if the software (or version) you need isn't available for your distro.

    8
  • Alternative to syncthing for large music collection?
  • gomp gomp 1w ago 100%

    The main difference is probably that I have a desktop PC rather than a laptop (plus, a few old hard disks lying around).

    I think I'll keep the local replica even when I'm finished reorganizing the library: the local copy doubles as a backup and I must say I am enjoying the faster access times.

    1
  • Alternative to syncthing for large music collection?
  • gomp gomp 1w ago 100%

    I also read that drives should not be spun down and up too often, but I think it only matters if you do that hundreds of times a day?

    Anyway, the reason I spin down my drives is to save electricity, and... more for the principle than for the electric bill (it's only 2 drives).

    4
  • The Starship booster has finally been caught!
  • gomp gomp 1w ago 100%

    I am amazed at the achievement, and even more amazed at how much people can cheer at anything like madmen.

    1
  • Alternative to syncthing for large music collection?
  • gomp gomp 1w ago 100%

    Never heard of it.... OMG that must be the worst name for a backup solution! :D

    It reeks of abandoned software (last release is 0.50 from 2018), but there is recent activity in git, so... IDK

    3
  • Alternative to syncthing for large music collection?
  • gomp gomp 1w ago 100%

    Yes, Syncthing does watch for file changes... that's why I am so puzzled that it also does full rescans :)

    Maybe they do that to catch changes that may have been made while syncthing was not running... it may make sense on mobies, where the OS like to kill processes willy-nilly, but IMHO not on a "real" computer

    5
  • Over the years I have accumulated a sizable music library (mostly flacs, adding up to a bit less than 1TB) that I now want to reorganize (ie. gradually process with Musicbrainz Picard). Since the music lives in my NAS, flacs are relatively big and my network speed is 1GB, I insalled on my computer a hdd I had laying around and replicated the whole library there; the idea being to work on local files and the sync them to the NAS. I setup Syncthing for replication and... everything works, *in theory*. In practice, Syncthing *loves* to rescan the whole library (given how long it takes, it must be reading all the data and computing checksums rather than just scanning the filesystem metadata - why on earth?) and that means my under-powered NAS (Celeron N3150) does nothing but rescanning the same files over and over. Syncthing by default rescans directories every hour (again, why on earth?), but it still seem to rescan a whole lot even after I have set `rescanIntervalS` to 90 days (maybe it rescans once regardless when restarted?). Anyway, I am looking into alternatives. Are there any you would recommend? (FOSS please) Notes: - I know I could just schedule a periodic rsync from my PC to the NAS, but I would prefer a bidirectional solution if possible (rsync is gonna be the last resort) - I read about [unison](https://github.com/bcpierce00/unison), but I also read that it's not great with big jobs and that it too scans a lot - The disks on my NAS go to sleep after 10 minutes idle time and if possible I would prefer not waking them up all the time (which would most probably happen if I scheduled a periodic rsync job - the NAS has RAM to spare, but there's no guarantee it'll keep in cache all the data rsync needs)

    86
    39
    [resolved] Help with haskell package that lives in a subdirectory of `src`
  • gomp gomp 1w ago 100%

    That's the thing you want to build (a single project may generate multiple executables - eg. a server and a client) so it won't help in this case but... I must say, I am impressed and really grateful that you went and looked that up for me! Thanks, mate!

    2
  • [resolved] Help with haskell package that lives in a subdirectory of `src`
  • gomp gomp 1w ago 100%

    cabal2nix doesn't care about any source-repository-package in cabal.project (I think it doesn't even read that file?).

    In my case, it generated a project that depended on the aeon from nixpkgs (which IIUC in turn comes from hackage) rather than the forked version.

    2
  • [resolved] Help with haskell package that lives in a subdirectory of `src`
  • gomp gomp 1w ago 100%

    I agree: flakes are great for development (and not only)!

    Unfortunately I still need to build that third party project from source :)
    Maybe I should look into disregarding the whole haskellPackages infrastructure and just build with cabal via a shell script.. IDK if that would be accepted in nixpkgs though :/

    2
  • *edit: for the solution, see my comment below* I need/want to build [aeson](https://github.com/haskell/aeson/) and its subproject *attoparsec-aeson* from source (it's a fork of the "official" *aeson*), but I'm stuck... can you help out? The sources of *attoparsec-aeson* live in a subdirectory of the *aeson* ones, so I have the sources: ```nix aeson-src = fetchFromGitHub { ... }; ``` and the "main" *aeson* library: ```nix aeson = haskellPackages.mkDerivation { pname = "aeson"; src = aeson-src; ... }; ``` When I get to *attoparsec-aeson* however I run into a wall: I tried to follow the [documentation about `sourceRoot`](https://ryantm.github.io/nixpkgs/stdenv/stdenv/#var-stdenv-sourceRoot): ``` attoparsec-aeson = haskellPackages.mkDerivation { pname = "attoparsec-aeson"; src = aeson-src; sourceRoot = "./attoparsec-aeson"; # maybe this should be "${aeson-src}/attoparsec-aeson"? # (it doesn't work either way) ... }; ``` but I get ```plaintext error: function 'anonymous lambda' called with unexpected argument 'sourceRoot' ``` Did I fail to spot some major blunder (I am nowhere near an expert)? Does `sourceRoot` not apply to `haskellPackages.mkDerivation`? What should I do to make it work? BTW: IDK if this may cause issues, but the `attoparsec-aeson` sources include symlinks to files in the "main" `attoparsec` sources: ```shell ~/git-clone-of-attoparsec-sources $ tree attoparsec-aeson/ attoparsec-aeson/ ├── src │   └── Data │   └── Aeson │   ├── Internal │   │   ├── ByteString.hs -> ../../../../../src/Data/Aeson/Internal/ByteString.hs │   │   ├── Text.hs -> ../../../../../src/Data/Aeson/Internal/Text.hs │   │   └── Word8.hs -> ../../../../../src/Data/Aeson/Internal/Word8.hs │   ├── Parser │   │   └── Internal.hs │   └── Parser.hs ├── attoparsec-aeson.cabal └── LICENSE ```

    7
    7
    What is the cheapest way to host my own server?
  • gomp gomp 1w ago 100%

    OP, I forgot to say! There are specific communities dedicated to self hosting and/or home labbing (eg. !selfhosted@lemmy.world), you may want to participate there

    11
  • What is the cheapest way to host my own server?
  • gomp gomp 1w ago 100%

    Yes, and computers people have laying around are most probably not outdated enterprise servers that draw 120w at idle :)
    (if anything, that's something a newbie self hoster may buy since they are cheap and look cool)

    5
  • What is the cheapest way to host my own server?
  • gomp gomp 1w ago 100%

    Cheapest? Use someone else's hrdware (or "borrow" it) and set it up at work/school/friend's house/cafe. Free hardware, free connectivity, free electricity.

    More seriously, set everithing up on whatever spare old computer you have at hand (or use a vm running on you pc). You should not start with buying hardware.

    18
  • ssh won't ask for password unless i force `PubkeyAuthentication=no`
  • gomp gomp 2w ago 100%

    The ones I added recently are all git-related (one key for signing and I started using different keys for codehaus, gitlab and github)

    3
  • ssh won't ask for password unless i force `PubkeyAuthentication=no`
  • gomp gomp 2w ago 100%

    I did add a bunch of new keys to my ssh agent... this might really be it!

    6
  • ssh won't ask for password unless i force `PubkeyAuthentication=no`
  • gomp gomp 2w ago 100%

    Now that's a neat idea! (not sure I'll ever implement it though: having passwords on my ssh keys is already enough of a hassle, plus having provisioning and scripts ask for password is a PITA)

    Anyway, I was just trying to authenticate with a password, like we used to back in the day :)
    (it's only for install isos or freshly installed systems that I've not provisioned yet - everything else requires a key).

    5
  • ssh won't ask for password unless i force `PubkeyAuthentication=no`
  • gomp gomp 2w ago 100%

    How would that improve security when all a bad actor has to do is add -o PubkeyAuthentication=no on their side?

    Also, I'm pretty sure it used to just ask for a password?

    2
  • Lately I noticed that when I want to ssh to a server using a password I need to specify `-o PubkeyAuthentication=no` or I won't be asked for a password and the authentication will fail (well, for all I know, setting some other option may work too). I use password authentication only once on freshly installed servers/vms, so it's not a huge deal, but... it still bothers me (mainly because I don't remember which option to set). Do you guys have any idea what it may be? ::: spoiler client's `~/.ssh/config` ``` Host 127.*.*.* 192.168.*.* 10.*.*.* 172.16.*.* 172.17.*.* 172.18.*.* 172.19.*.* 172.2?.*.* 172.30.*.* 172.31.*.* LogLevel quiet Stricthostkeychecking no Userknownhostsfile /dev/null Host * ForwardAgent no AddKeysToAgent no Compression yes ServerAliveInterval 10 ServerAliveCountMax 3 HashKnownHosts no UserKnownHostsFile ~/.ssh/known_hosts ControlMaster no ControlPath ~/.ssh/master-%r@%n:%p ControlPersist no ``` ::: ::: spoiler server's `/etc/ssh/sshd_config` (it's from the nixos install iso) ``` AuthorizedPrincipalsFile none Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr GatewayPorts no KbdInteractiveAuthentication yes KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 LogLevel INFO Macs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com PasswordAuthentication yes PermitRootLogin yes PrintMotd no StrictModes yes UseDns no UsePAM yes X11Forwarding no Banner none AddressFamily any Port 22 Subsystem sftp /nix/store/78mv13w9mgh0s0rd7rnr6ff4d7a39bpd-openssh-9.7p1/libexec/sftp-server AuthorizedKeysFile %h/.ssh/authorized_keys /etc/ssh/authorized_keys.d/%u HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_ed25519_key ``` :::

    41
    15

    > **Solution:** > [hd-idle](https://github.com/adelolmo/hd-idle) is the way to go (if you read their README, they explain that most drives don't support idle timers) I've been looking into spinning down the drives of my NAS, as I use it infrequently and that brings power drain down from ~30W to ~17W. Problem is, `hdparm -S` doesn't seem to do anything for these particular drives: if I set it and wait for the appropriate amount of time (eg. 5 seconds if set to 1) the drives are still reported as "active/idle" and power drain doesn't go down. Both `hdparm -y` and `hdparm -Y` work fine, but I don't seem to be able to find settings for them in tlp (probably because they are commands rather than settings?). Besides the caveats about disks living longer if they are kept spinning, are there reasons why I shouldn't setup a cron job (well, a systemd timer) that runs `hdparm -Y` every 10 minutes? (for example, could `hdparm -y` cause errors if run while the drive is being backed up?) PS: According to `hdparm`'s manpage, `-y` puts the drive *standby* mode while `-Y` puts it into *sleep* mode. Considering that in my case power drain seems the same either way, should I prefer one or the other?

    31
    12

    (I'm just starting off with rust, so please be patient) Is there an idiomatic way of writing the following as a one-liner, somehow informing rustc that it should keep the `PathBuf` around? ```rust // nevermind the fully-qualified names // they are there to clarify the code // (that's what I hope at least) let dir: std::path::PathBuf = std::env::current_dir().unwrap(); let dir: &std::path::Path = dir.as_path(); // this won't do: // let dir = std::env::current_dir().unwrap().as_path(); ``` I do understand why rust complains that "temporary value dropped while borrowed" (I mean, the message says it all), but, since I don't really need the `PathBuf` for anything else, I was wondering if there's an idiomatic to tell rust that it should extend its life until the end of the code block.

    15
    11

    I want to have my screen (the "dev" workspace) split in three "zones": - on the left side, a tabbed group with all the text editors I start (ie. if I start a new one, it goes there in a new tab) - on the top-right, a tabbed group of whatever many terminal I feel like launching - on the bottom-right, my browsers (and possibly other stuff), in a group *without* tabs - a key combination to cycle between: all three "zones" visible, text editors on the left - terminal on the right, text editors on the left - browser on the right, fullscreen browser So far I've been looking at hyprland (for no particular reason except the hype) and I don't think I can do the above with it (I am by no means an expert, so... maybe it can actually be done?). Do you know of any WM where it would be possible? (possibly, one with automatic splitting a-la bspwm, that I would use for the other workspaces)

    51
    7

    I've been looking around for a scripting language that: - has a cli interpreter - is a "general purpose" language (yes, awk is touring complete but no way I'm using that except for manipulating text) - allows to write in a functional style (ie. it has functions like map, fold, etc and allows to pass functions around as arguments) - has a small disk footprint - has decent documentation (doesn't need to be great: I can figure out most things, but I don't want to have to look at the interpter source code to do so) - has a simple/straightforward setup (ideally, it should be a single executable that I can just copy to a remote system, use to run a script and then delete) Do you know of something that would fit the bill? --- Here's a use case (the one I run into today, but this is a recurring thing for me). For my homelab I need (well, want) to generate a luhn mod n [check digit](https://en.wikipedia.org/wiki/Check_digit) (it's for my provisioning scripts to generate synchting device ids from their certificates). I couldn't find ready-made utilities for this and I might actually need might a variation of the "official" algorithm (IIUC syncthing had a bug in their initial implementation and decided to run with it). I don't have python (or even bash) available in all my systems, and so my goto language for script is usually sh (yes, posix sh), which in all honestly is quite frustrating for manipulating data.

    112
    142

    After years of my desktop environment (kde) being configured the same way, I tried enabling auto-hiding in my panel and I quite like the extra screen estate. Now, the only reasons why I have a panel in the first place are the clock and the system tray (I don't use the ~~start~~ *applications* menu and I don't care for the task manager) so I've started wondering if I could completely dispose of the panel. Do you know of any launcher (I use krunner but switching to something else is fine) that satisfies (or can be configured to satisfy) the following? 1. shows the current date/time 1. integrates a system tray 1. launches applications 1. does math, unit conversion and currency conversion

    23
    8

    While updating home-manager I got a notice that `freeimage-unstable-2021-11-01` is marked as unsafe. Since chances are it's used by something I never use, I'd like to know what I'm using that depends on it... any idea how to do it? Also.. any idea why I have 4 copies of the freeimage stuff in my `/nix/store`? (I just run `nix-collect-garbage -d` and the 4 seem to be actually different): ``` ❱ md5sum /nix/store/*freeimage*/lib/libfreeimage.a 67a0ce1cb5dd562473e27d7c88e8a9bd /nix/store/6gi6hm57zngqnxb6p5dnxhjjcbr96lrk-freeimage-unstable-2021-11-01/lib/libfreeimage.a 5995e0affbfa28b63da7e997cb4dbe63 /nix/store/09nwykzzksc0zknflsyxyah5b67c2rsn-freeimage-unstable-2021-11-01/lib/libfreeimage.a 67a0ce1cb5dd562473e27d7c88e8a9bd /nix/store/ikfiv4gpmcpyir7lsj45by653qcnvgyx-freeimage-unstable-2021-11-01/lib/libfreeimage.a 213a408e3c1fbb5dfa4491deebe05984 /nix/store/q2sc85f2hclgwl8m3qdw8rpbs44gzmah-freeimage-unstable-2021-11-01/lib/libfreeimage.a ```

    14
    6

    I've been looking for something to replace the google chromecast that is attached to our TV. I've tried Kodi out, but the main use case for the TV set is a 70+ yo person watching netflix and there is just no way they will be better off with Kodi than with the stock netflix app. Besides supporting netflix, being easy to use, and providing significantly better privacy than the chromecast does, the device would ideally: - support other mainstream streaming (amazon, disney, ...) for when my people get tired of netflix - support a DVB-T2 usb stick (directly, or through IPTV: I can put the stick in a different machine) - support youtube without ads (through an adblocker and possibly sponsorblock, or maybe using invidious) - possibly, support local public TV streaming (eg. BBC) I have a PC set aside that should be more than capable enough (intel N100), but I'm open to getting new hardware if needed. Also, it doesn't matter if the system is not very user friendly to setup (eg. if it needs to be nixos), but once it's setup it should be easy to use and relatively straightforward to update/maintain. I guess a FOSS android TV would be ideal, but.. is there any? (I see Lineage supports the Google ADT-3, but that is basically unobtanium, at least where I live).

    66
    41

    The app at my gym sucks: there is no checklist of what exercises you have done and no tracking of how much weight you used. Plus, for whatever reason, it wants access to my location. I've found a number of alternatives on F-Droid, but each of the six or so I tried was completely unusable (some seemed unfinished alphas, others are probably too old for my android version). Is there one app that you use and would recommend? What I'm looking for is: - At home: I setup my programs (different ones for different days) - At the gym: I can select a program, check off the exercises while I do them (the order I do them on depends on where there is fewer people at the gym), and log things like if I managed all the sets/reps, how much weight I used, and how long I exercised for (for things like the tapis roulant). - Bonus points if I can also track my weight in the same app, and if the app can export/sync the data or produce some kind of graphs/statistics based on it. Thanks!

    17
    5

    *This may be OT since strictly speaking it's about hardware... I trust it is ok to post it given the spirit of the community, but have my apologies and feel free to remove it if it's not.* I'm looking to replace my old Bose QC25, since they have recently died (after a long a fulfilling life), but it seems everything nowadays is bluetooth (which I don't mind) and require some proprietary app to turn ANC on/off (which I do mind... are physical buttons/switches become too expensive to include in your overpriced earbuds?). Anyway... do you know of any headphones/earbuds that meet the following? 1. can be powered via wire or have batteries that last 12+hrs (long-haul flights) 2. have decent noise cancelling 3. don't require me to install a apps or can be used with some open source app (possibly with full functionality and straightforward to setup) 4. are not overly expensive (I have to buy 2 pairs and I'll only use them a few times a year when I fly)

    60
    41
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos gomp 1y ago 100%
    How can I reference the `escapeSystemdPath` function (from nixpkgs' `nixos/lib/utils.nix`) in my config?

    I want to call the `escapeSystemdPath` (defined in nixpgs at `nixos/lib/utils.nix`) to derive the name of a systemd mount unit from the target path (eg. `srv-my-dir.mount` from `/srv/my/dir`), but I can't figure out how I can reference it... any ideas?

    1
    3
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos gomp 1y ago 100%
    Who's setting up swap for me?

    I'm playing around with nixos in a few VMs and at some point I realized I must have lost the swap configuration in one of my refactorings. To my surprise, however, the VMs do use the swap partitions I had set up. There is no mention on "swap" in my nix configuration (or in `fstab`) and no `.swap` units in `/etc/systemd/system`; I do however have a swap partition labelled "swap". Turns out there is a systemd unit (albeit not a corresponding file) that sets up swap: ``` [root@vm1:~]# free -hw total used free shared buffers cache available Mem: 2.8Gi 664Mi 955Mi 4.0Mi 3.0Mi 1.3Gi 2.0Gi Swap: 3.7Gi 0B 3.7Gi [root@vm1:~]# systemctl list-dependencies swap.target swap.target ● └─dev-disk-by\x2ddiskseq-1\x2dpart3.swap ``` I'm wondering where the unit comes from? Can I rely on this and never configure swap ever again?

    5
    2

    Is there an extension that warns you when you are wasting time reading ai-generated crap? Case in point, I was reading [an article that claimed to compare kubernetes distros](https://www.nops.io/blog/k0s-vs-k3s-vs-k8s/) and wasted some good minutes before realizing it was full of crap.

    114
    28
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos gomp 1y ago 100%
    Defining an option that can only be set in certain circumstances

    I have an option that must be left with the default value when a certain flag (another option) is false. I didn't find any example (let alone documentation) on how to implement this, so I've come up with two ideas: ````nix option-that-errors-out-if-set-when-flag-is-false = let default = if config.some-flag then "some default value for when flag is true" else "value that should not be changed when flag is false"; in lib.mkOption { type = lib.types.str; inherit default; apply = v: assert assertMsg (config.some-flag || v == default) "Do not set this option unless 'flag' is true"; v; }; ```` ````nix option-that-ignores-value-when-flag-is-false = let default = if config.some-flag then "some default value for when flag is true" else "value that should not be changed when flag is false"; in lib.mkOption { type = lib.types.str; inherit default; apply = v: if config.some-flag then v else default; }; ```` Which one do you think is "best" (cleaner, more idiomatic, etc..)? Is `apply` the "right" place to validate options? Should I make a custom type instead? Should I approach this in some different way?

    10
    1
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos gomp 1y ago 100%
    Setting "global" options from a submodule?

    I'd like to set a "global" option from within a submodule, but the `config` I return is grafted into the "global" under the submodule "path" rather than at the root... any idea if it's somehow possible? Er... I guess I didn't make a great job at explaining what I want to do... Some code will hopefully help. In `mymodule.nix` I have: ```` { lib, config, ... }: { options.myoption = lib.mkOption { type = lib.types.attrsOf (lib.types.submodule ( import ./mysubmodule.nix )); }; } ```` and `mysubmodule.nix` is: ```` { name, lib, config, ... }: { options.mysubmoduleoption = { type = lib.types.str; }; config = { # here I want to set a "global" option, say "systemd.mounts" # based on the value of "mymodule.name.mysubmoduleoption" # but it seems I can only set values under "mymodule.name" }; } ````

    5
    4
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos gomp 1y ago 100%
    Help with `builtins.trace`

    I'm trying to debug a module I'm writing with `builtins.trace`, but it's being more complicated than I anticipated. Let's say I have a module: ````nix { config, lib, pkgs, modulesPath, ... }: { config = let some-list = lib.attrsets.mapAttrsToList (n: v: { some-attr = "${n} ${v}"; }) { n1 = "v1"; n2 = "v2"; }; in { users.mutableUsers = builtins.trace (some-list) false; }; } ```` This will print ```` trace: [ <code> <code> ] ```` because `builtins.trace` (for whatever reason?) evaluates its first argument only shallowly. Changing the `trace` expression to: ``` builtins.trace (builtins.toJSON some-list) false; ``` helps a lot, but as soon as one tries to print a long list or a structure with some complexity the output is completely unreadable, and it's not like it can easily be piped into `jq` (I mean... `&amp;| grep ^trace: | sed 's/trace: //' | jq` works\*, but there must be a "better" way?) (*) in fish shell, IDK about bash</code></code> edit: It's not like I specifically want JSON output: any format will do (ideally, nix would be nice)

    9
    4
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos gomp 1y ago 100%
    How to merge multiple `writeShellApplication` into a single package?

    I need to generate a number of scripts in my configuration and make them into a single package (for ease of reference, because there are a lot of them). So far, I'm creating the scripts via `writeShellApplication`, making them into packages via an `overlay`, merging them with `buildEnv` and then adding the resulting package to `systemPackages. Something like: ````nix nixpkgs.overlays = [ (final: prev: { my-hello-1 = final.writeShellApplication { name = "my-hello-1-script"; text = "echo my hello wolrd 1"; }; my-hello-2 = final.writeShellApplication { name = "my-hello-2-script"; text = "echo my hello wolrd 1"; }; my-hello-scripts = final.buildEnv { name = "my-hello-scripts"; paths = [ final.my-hello-1 final.my-hello-2 ]; }; }) ]; environment.systemPackages = [ pkgs.my-hello-scripts ]; ```` This works, but I don't really need the `my-hello-1` and `my-hello-2` packages... can you think of a way to make do without needing them?

    4
    8