nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 qt6,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "blobdrop";
12 version = "2.1";
13
14 src = fetchFromGitHub {
15 owner = "vimpostor";
16 repo = "blobdrop";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-o2+qtkyu2qcwXpum3KiogyO8D6aY7bRJ6y4FWQKQY/o=";
19 };
20
21 strictDeps = true;
22
23 nativeBuildInputs = [
24 cmake
25 qt6.wrapQtAppsHook
26 ]
27 ++ lib.optionals stdenv.hostPlatform.isLinux [
28 pkg-config
29 ];
30
31 buildInputs = [
32 qt6.qtdeclarative
33 qt6.qtsvg
34 ]
35 ++ lib.optionals stdenv.hostPlatform.isLinux [
36 qt6.qtwayland
37 ];
38
39 cmakeFlags = [
40 (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
41 ];
42
43 doCheck = true;
44
45 preCheck = ''
46 export QT_QPA_PLATFORM=offscreen
47 '';
48
49 meta = {
50 broken = stdenv.hostPlatform.isDarwin;
51 changelog = "https://github.com/vimpostor/blobdrop/releases/tag/v${finalAttrs.version}";
52 description = "Drag and drop files directly out of the terminal";
53 homepage = "https://github.com/vimpostor/blobdrop";
54 license = lib.licenses.gpl3Only;
55 mainProgram = "blobdrop";
56 maintainers = with lib.maintainers; [ tomasajt ];
57 platforms = lib.platforms.all;
58 };
59})