St: Difference between revisions

imported>Lubsch
Remove my faulty example
imported>IgorM
m Fixed syntax highlighting
Line 44: Line 44:
Followed by:
Followed by:


<syntaxhighlight>
<syntaxhighlight lang=console>
$ nix-env -i -f my-custom-st
$ nix-env -i -f my-custom-st
</syntaxhighlight>
</syntaxhighlight>
Line 56: Line 56:
To apply a patch you need to obtain the hash, the hash should be obtained with the following command
To apply a patch you need to obtain the hash, the hash should be obtained with the following command


<syntaxhighlight lang="sh">
<syntaxhighlight lang="console">
$ nix-prefetch-url <url>
$ nix-prefetch-url <url>
</syntaxhighlight>
</syntaxhighlight>
example
example
<syntaxhighlight lang="sh">
<syntaxhighlight lang="console">
$ nix-prefetch-url https://st.suckless.org/patches/rightclickpaste/st-rightclickpaste-0.8.2.diff
$ nix-prefetch-url https://st.suckless.org/patches/rightclickpaste/st-rightclickpaste-0.8.2.diff
</syntaxhighlight>
</syntaxhighlight>
Line 228: Line 228:
</nowiki>}}
</nowiki>}}


<syntaxhighlight lang="sh">
<syntaxhighlight lang="console">
nix-shell st-test.nix
$ nix-shell st-test.nix
unpackPhase
$ unpackPhase
ls
$ ls
cd theunpackeddir
$ cd theunpackeddir
patchPhase
$ patchPhase
</syntaxhighlight>
</syntaxhighlight>
[https://nixos.org/manual/nixpkgs/stable/#sec-stdenv-phases Additional phases]
[https://nixos.org/manual/nixpkgs/stable/#sec-stdenv-phases Additional phases]