Created
March 24, 2023 04:31
-
-
Save nixinator/ce6a123825772f191bd22427ae0fa1d4 to your computer and use it in GitHub Desktop.
lief try building this
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[nix-shell:~/src/cowsay]$ cat flake.nix | |
{ | |
description = "A simple script that runs cowsay"; | |
outputs = { self, nixpkgs }: { | |
defaultPackage.x86_64-linux = self.packages.x86_64-linux.my-script; | |
packages.x86_64-linux.my-script = | |
let | |
pkgs = import nixpkgs { system = "x86_64-linux"; }; | |
in | |
pkgs.writeShellScriptBin "my-script" '' | |
DATE="$(\${pkgs.coreutils}/bin/date +'the %d of %m, %Y')" | |
\${pkgs.cowsay}/bin/cowsay Hello, world! Today is $DATE. | |
''; | |
}; | |
} | |
copy this to a flake.nix | |
and do | |
nix build | |
and you'll get a new script in result/bin/my-script ... | |
enjoy! | |
it will work! it's impossible for it not to! |
I can help with that, if you got questions or get stuck, let me know.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok I will try this tonight. I got Nix-OS running on android. I will drop some screenshots on my linkedin.
I want to set up a webserver and port raveberry to it so I can have a mobile party. https://github.com/raveberry/raveberry