flake.nix 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
  3. outputs = { self, nixpkgs } :
  4. rec
  5. {
  6. system = "x86_64-linux";
  7. packages.x86_64-linux.libgtkflow3 =
  8. with import nixpkgs {inherit system;};
  9. stdenv.mkDerivation rec {
  10. pname = "libgtkflow3";
  11. version = "1.0.6";
  12. src = ./.;
  13. nativeBuildInputs = [
  14. vala
  15. meson
  16. ninja
  17. pkg-config
  18. gobject-introspection
  19. ];
  20. buildInputs = [
  21. gtk3
  22. glib
  23. self.packages.${system}.libgflow
  24. ];
  25. mesonFlags = [
  26. "-Denable_valadoc=true"
  27. "-Denable_gtk3=true"
  28. "-Denable_gtk4=false"
  29. "-Denable_gflow=false"
  30. ];
  31. postPatch = ''
  32. rm -r libgflow
  33. '';
  34. meta = with lib; {
  35. description = "Flow graph widget for GTK 3";
  36. homepage = "https://notabug.org/grindhold/libgtkflow";
  37. maintainers = with maintainers; [ grindhold ];
  38. license = licenses.lgpl3Plus;
  39. platforms = platforms.unix;
  40. };
  41. };
  42. packages.x86_64-linux.libgtkflow4 =
  43. with import nixpkgs {inherit system;};
  44. stdenv.mkDerivation rec {
  45. pname = "libgtkflow4";
  46. version = "0.2.6";
  47. src = ./.;
  48. nativeBuildInputs = [
  49. vala
  50. meson
  51. ninja
  52. pkg-config
  53. gobject-introspection
  54. ];
  55. buildInputs = [
  56. gtk4
  57. glib
  58. self.packages.${system}.libgflow
  59. ];
  60. mesonFlags = [
  61. "-Denable_valadoc=true"
  62. "-Denable_gtk3=false"
  63. "-Denable_gtk4=true"
  64. "-Denable_gflow=false"
  65. ];
  66. postPatch = ''
  67. rm -r libgflow
  68. '';
  69. meta = with lib; {
  70. description = "Flow graph widget for GTK 3";
  71. homepage = "https://notabug.org/grindhold/libgtkflow";
  72. maintainers = with maintainers; [ grindhold ];
  73. license = licenses.lgpl3Plus;
  74. platforms = platforms.unix;
  75. };
  76. };
  77. packages.x86_64-linux.libgflow =
  78. with import nixpkgs {inherit system;};
  79. stdenv.mkDerivation rec {
  80. pname = "libgflow";
  81. version = "1.0.4";
  82. src = ./.;
  83. nativeBuildInputs = [
  84. vala
  85. meson
  86. ninja
  87. pkg-config
  88. gobject-introspection
  89. ];
  90. buildInputs = [
  91. glib
  92. ];
  93. mesonFlags = [
  94. "-Denable_valadoc=true"
  95. "-Denable_gtk3=false"
  96. "-Denable_gtk4=false"
  97. "-Denable_gflow=true"
  98. ];
  99. meta = with lib; {
  100. description = "Abstract flow graph logic for GLib";
  101. homepage = "https://notabug.org/grindhold/libgtkflow";
  102. maintainers = with maintainers; [ grindhold ];
  103. license = licenses.lgpl3Plus;
  104. platforms = platforms.unix;
  105. };
  106. };
  107. devShell.x86_64-linux =
  108. with import nixpkgs {inherit system;};
  109. mkShell {
  110. name = "flohmarkt devshell";
  111. buildInputs = [
  112. vala
  113. meson
  114. ninja
  115. pkg-config
  116. gobject-introspection
  117. gtk3
  118. gtk4
  119. glib
  120. python3
  121. python3Packages.pygobject3
  122. self.packages.${system}.libgflow
  123. ];
  124. };
  125. };
  126. }