Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Static nix-shell shebangs #447

Closed
Closed
@timokau

Description

@timokau

I want to usenix-shell shebangs in my personal script collection to make sure all the needed dependencies are available. That has two disadvantages however:

  • it adds significant overhead (~half a second on my machine if all dependencies are already present)
  • dependencies may be garbage collected so usage of scripts may need internet access

So what I'd actually like is nix-shell like dependency declaration that is resolved statically whenever I update my channels. I've hacked together a proof of concept to do this in home-manager: I iterate through all my scripts, parse the nix-shell shebang line and generate a wrapper script that setsPATH. It is very hacky at the moment and I'm not sure yet if I will improve it in the future, but I thought it couldn't hurt to share it here. What do you think about including something similar as ahome-manager library function?

Here is my POC which I import in myhome.nix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp