Skip to content

Commit

Permalink
bobcat: refactor
Browse files Browse the repository at this point in the history
- finalAttrs
- hammer
- nixfmt-rfc-style
- adoption
  • Loading branch information
AndersonTorres committed Oct 9, 2024
1 parent 5deaa11 commit 0e6fa10
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions pkgs/by-name/bo/bobcat/package.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
{ lib
, stdenv
, fetchFromGitLab
, icmake
, yodl
, libmilter
, libX11
, openssl
, readline
, util-linux
{
lib,
fetchFromGitLab,
icmake,
libX11,
libmilter,
openssl,
readline,
stdenv,
util-linux,
yodl,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "bobcat";
version = "5.11.01";

src = fetchFromGitLab {
name = "bobcat-source-${finalAttrs.version}";
domain = "gitlab.com";
owner = "fbb-git";
repo = "bobcat";
rev = version;
rev = finalAttrs.version;
hash = "sha256-JLJKaJmztputIon9JkKzpm3Ch60iwm4Imh9p42crYzA=";
};

sourceRoot = "${src.name}/bobcat";

postPatch = ''
substituteInPlace INSTALL.im \
--replace "/usr" "$out"
sed -i "6i #include <cstdint>" logbuf/logbuf
patchShebangs .
'';

strictDeps = true;
sourceRoot = "${finalAttrs.src.name}/bobcat";

nativeBuildInputs = [
icmake
Expand All @@ -46,6 +39,15 @@ stdenv.mkDerivation rec {
util-linux
];

strictDeps = true;

postPatch = ''
substituteInPlace INSTALL.im \
--replace "/usr" "$out"
sed -i "6i #include <cstdint>" logbuf/logbuf
patchShebangs .
'';

buildPhase = ''
runHook preBuild
Expand All @@ -63,10 +65,11 @@ stdenv.mkDerivation rec {
runHook postBuild
'';

meta = with lib; {
description = "Brokken's Own Base Classes And Templates";
meta = {
homepage = "https://fbb-git.gitlab.io/bobcat/";
license = licenses.gpl3Only;
platforms = platforms.linux;
description = "Brokken's Own Base Classes And Templates";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
};
}
})

0 comments on commit 0e6fa10

Please sign in to comment.