mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 02:55:39 +00:00
fnlfmt: init
This commit is contained in:
parent
4886108e60
commit
3b5172eae1
41
pkgs/development/tools/fnlfmt/default.nix
Normal file
41
pkgs/development/tools/fnlfmt/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{ lib, stdenv, fetchFromSourcehut, fennel, lua }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "fnlfmt";
|
||||||
|
version = "0.2.1";
|
||||||
|
|
||||||
|
src = fetchFromSourcehut {
|
||||||
|
owner = "~technomancy";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-JIqeQhI3fFGrej2wbj6/367IZqWAFegySc2R8IDmvGE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ fennel ];
|
||||||
|
|
||||||
|
buildInputs = [ lua ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
echo "#!${lua}/bin/lua" > fnlfmt
|
||||||
|
${fennel}/bin/fennel --require-as-include --compile cli.fnl >> fnlfmt
|
||||||
|
chmod +x fnlfmt
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -D ./fnlfmt $out/bin/fnlfmt
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Formatter for Fennel";
|
||||||
|
homepage = "https://git.sr.ht/~technomancy/fnlfmt";
|
||||||
|
license = licenses.lgpl3Plus;
|
||||||
|
platforms = lua.meta.platforms;
|
||||||
|
maintainers = [ maintainers.gpanders ];
|
||||||
|
};
|
||||||
|
}
|
@ -10891,6 +10891,8 @@ in
|
|||||||
recurseIntoAttrs (callPackage ../development/compilers/flutter { });
|
recurseIntoAttrs (callPackage ../development/compilers/flutter { });
|
||||||
flutter = flutterPackages.stable;
|
flutter = flutterPackages.stable;
|
||||||
|
|
||||||
|
fnlfmt = callPackage ../development/tools/fnlfmt { };
|
||||||
|
|
||||||
fpc = callPackage ../development/compilers/fpc { };
|
fpc = callPackage ../development/compilers/fpc { };
|
||||||
|
|
||||||
g203-led = callPackage ../tools/misc/g203-led { };
|
g203-led = callPackage ../tools/misc/g203-led { };
|
||||||
|
Loading…
Reference in New Issue
Block a user