guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to define shebang for guix shell file


From: Jacob Hrbek
Subject: Unable to define shebang for guix shell file
Date: Mon, 01 Nov 2021 00:08:17 +0000

I am unable to define a guix shell file with shebang to decrease the complexity needed in the repository managing (so that i can just do ./path/to/guix.scm for guix to invoke `guix shell -f ./path/to/guix.scm` instead of having to sanitize the runtime) as the issue is that POSIX shebang allows only one argument and due to the way we handle reproducibility the shebang has to be `#!/usr/bin/env <command>`

Proposing to integrate guix-shell for this purpose (inspired by NixOS) e.g.

```nix
#!/usr/bin/env nix-shell
# NixOS shell configuration to bootstrap the required dependencies to run and use the editor

# NOTE(Krey): This is designed to contain ONLY editor-specific configuration **NOT** project specific

let
    nivSources = builtins.fetchGit {
        url = ""mailto:gitea@git.dotya.ml">gitea@git.dotya.ml:RiXotStudio/std-niv.git";
        rev = "7664e29d8ba174cde2e4ff98331fa12e18258b7a"; # 24/10/2021-EU 23:57:10 CEST
        ref = "central";
    };
in {
    sources ? import "${nivSources}/sources.nix",
    nixpkgs ? import sources.nixpkgs {},
}:
with nixpkgs;
    stdenv.mkDerivation {
        name = "RiXotStudio_emacs-config";
        buildInputs = [
            fira-code # Default font with liqurature support
            emacs # Editor
        ];

    }
```

-- Jacob "Kreyren" Hrbek

Sent with ProtonMail Secure Email.

Attachment: publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]