feat(3p/dfmt): Add derivation for the D code formatter
Change-Id: I4e06676f45df334db4fbc4f1657a6f16828547dc Reviewed-on: https://cl.tvl.fyi/c/depot/+/3727 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
465c9e7257
commit
67ec19e854
2 changed files with 36 additions and 1 deletions
35
third_party/dfmt/default.nix
vendored
Normal file
35
third_party/dfmt/default.nix
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# dfmt is a code formatter for D
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "dfmt";
|
||||||
|
version = "0.13.4";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "dlang-community";
|
||||||
|
repo = "dfmt";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "02a8qvrmnl1c15y6irxlhqpr0hjj5s8qk0jc20ivj0fl6p4v9shj";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
dmd
|
||||||
|
|
||||||
|
# fake git that will be used to fetch the version string
|
||||||
|
(pkgs.writeShellScriptBin "git" ''
|
||||||
|
echo 'v${version}'
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp bin/dfmt $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "D code formatter";
|
||||||
|
homepage = "https://github.com/dlang-community/dfmt";
|
||||||
|
license = lib.licenses.boost;
|
||||||
|
};
|
||||||
|
}
|
|
@ -237,6 +237,7 @@ in lib.fix(self: {
|
||||||
screenLock
|
screenLock
|
||||||
tools.nsfv-setup
|
tools.nsfv-setup
|
||||||
users.tazjin.emacs
|
users.tazjin.emacs
|
||||||
|
third_party.dfmt
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
# programs from nixpkgs
|
# programs from nixpkgs
|
||||||
|
@ -245,7 +246,6 @@ in lib.fix(self: {
|
||||||
chromium
|
chromium
|
||||||
curl
|
curl
|
||||||
ddcutil
|
ddcutil
|
||||||
dfmt
|
|
||||||
direnv
|
direnv
|
||||||
dmd
|
dmd
|
||||||
dnsutils
|
dnsutils
|
||||||
|
|
Loading…
Reference in a new issue