nixpkgs/pkgs/by-name/di/dirstalk/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

47 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
}:
buildGoModule rec {
pname = "dirstalk";
version = "1.3.3";
src = fetchFromGitHub {
owner = "stefanoj3";
repo = pname;
rev = version;
hash = "sha256-gSMkTGzMDI+scG3FQ0u0liUDL4qOPPW2UWLlAQcmmaA=";
};
patches = [
# update dependencies to fix darwin build - remove in next release
(fetchpatch {
url = "https://github.com/stefanoj3/dirstalk/commit/79aef14c5c048f3a3a8374f42c7a0d52fc9f7b50.patch";
sha256 = "sha256-2rSrMowfYdKV69Yg2QBzam3WOwGrSHQB+3uVi1Z2oJ8=";
})
];
vendorHash = "sha256-XY4vIh5de0tp4KPXTpzTm7/2bDisTjCsojLzxVDf4Jw=";
subPackages = "cmd/dirstalk";
ldflags = [
"-w"
"-s"
"-X github.com/stefanoj3/dirstalk/pkg/cmd.Version=${version}"
];
# Tests want to write to the root directory
doCheck = false;
meta = with lib; {
description = "Tool to brute force paths on web servers";
mainProgram = "dirstalk";
homepage = "https://github.com/stefanoj3/dirstalk";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}