diff options
| author | 2025-12-20 22:56:15 +0000 | |
|---|---|---|
| committer | 2025-12-20 23:02:07 +0000 | |
| commit | b200eba0f9b2a47a0f5dce51f0cfadb0272360c4 (patch) | |
| tree | 5d0d9c13bce81b11abc046713d6ddda97be6b614 /pkgs | |
| parent | rename watcher scripts (diff) | |
| signature | ||
little-things: compile binaries
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/little-things/default.nix | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/little-things/default.nix b/pkgs/little-things/default.nix index 9f01040..d6353b6 100644 --- a/pkgs/little-things/default.nix +++ b/pkgs/little-things/default.nix @@ -1,5 +1,7 @@ -{ stdenvNoCC -, fetchFromGitea +{ + stdenvNoCC, + fetchFromGitea, + gcc, }: stdenvNoCC.mkDerivation (finalAttrs: { @@ -14,8 +16,22 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-wWKPnpxsEfpZDAdIvxYYFMdkcs4yD41xJKtbAPJJgiM="; }; + nativeBuildInputs = [ gcc ]; + buildPhase = '' + for file in *.c; do + echo "compiling $file" + orig=$(basename "$file" ".c") + rm "$orig" + case "$orig" in + "youtube-extract-rapid") continue;; + esac + gcc -o "$orig" "$file" + rm "$file" + done + ''; + installPhase = '' - install -Dt $out/bin $src/* + install -Dt $out/bin * ''; }) |
