nixpkgs/pkgs/by-name/ca/catatonit/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

42 lines
1.0 KiB
Nix

{ stdenv
, lib
, autoreconfHook
, fetchFromGitHub
, glibc
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "catatonit";
version = "0.2.0";
src = fetchFromGitHub {
owner = "openSUSE";
repo = pname;
rev = "v${version}";
sha256 = "sha256-AqJURf4OrPHfTm5joA3oPXH4McE1k0ouvDXAF3jiwgk=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = lib.optionals (!stdenv.hostPlatform.isMusl) [ glibc glibc.static ];
enableParallelBuilding = true;
strictDeps = true;
doInstallCheck = true;
installCheckPhase = ''
readelf -d $out/bin/catatonit | grep 'There is no dynamic section in this file.'
'';
passthru.tests = { inherit (nixosTests) podman; };
meta = with lib; {
description = "Container init that is so simple it's effectively brain-dead";
homepage = "https://github.com/openSUSE/catatonit";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ erosennin ] ++ teams.podman.members;
platforms = platforms.linux;
mainProgram = "catatonit";
};
}