nixpkgs/pkgs/by-name/mi/miniscript/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

44 lines
1.1 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "miniscript";
version = "unstable-2023-03-16";
src = fetchFromGitHub {
owner = "sipa";
repo = pname;
rev = "6806dfb15a1fafabf7dd28aae3c9d2bc49db01f1";
sha256 = "sha256-qkYDzsl2Y4WEDDXs9cE/jIXm01jclkYUQbDGe1S0wYs=";
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Replace hardcoded g++ with c++ so clang can be used
# on darwin
substituteInPlace Makefile \
--replace-fail 'g++' 'c++'
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp miniscript $out/bin/miniscript
runHook postInstall
'';
meta = with lib; {
description = "Compiler and inspector for the miniscript Bitcoin policy language";
longDescription = "Miniscript is a language for writing (a subset of) Bitcoin Scripts in a structured way, enabling analysis, composition, generic signing and more.";
homepage = "https://bitcoin.sipa.be/miniscript/";
license = licenses.mit;
maintainers = with maintainers; [
RaghavSood
jb55
];
mainProgram = "miniscript";
};
}