nixpkgs/pkgs/applications/editors/notepadqq/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

70 lines
1.2 KiB
Nix

{
mkDerivation,
lib,
fetchFromGitHub,
pkg-config,
which,
libuchardet,
qtbase,
qtsvg,
qttools,
qtwebengine,
qtwebsockets,
}:
mkDerivation rec {
pname = "notepadqq";
# shipping a beta build as there's no proper release which supports qtwebengine
version = "2.0.0-beta";
src = fetchFromGitHub {
owner = "notepadqq";
repo = "notepadqq";
rev = "v${version}";
sha256 = "sha256-XA9Ay9kJApY+bDeOf0iPv+BWYFuTmIuqsLEPgRTCZCE=";
};
patches = [
# Fix: chmod in the Makefile fails randomly
# Move it to preFixup instead
./fix-configure.patch
];
nativeBuildInputs = [
pkg-config
which
qttools
];
buildInputs = [
libuchardet
qtbase
qtsvg
qtwebengine
qtwebsockets
];
strictDeps = false; # breaks qmake
preConfigure = ''
export LRELEASE="lrelease"
'';
dontWrapQtApps = true;
preFixup = ''
chmod +x $out/bin/notepadqq
wrapQtApp $out/bin/notepadqq
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://notepadqq.com/";
description = "Notepad++-like editor for the Linux desktop";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.rszibele ];
mainProgram = "notepadqq";
};
}