Debian Codegraph @

flake.nix

raw symbols SCIP
1 {
2 description = "A simple joystick tester based on Gtk+";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 flake-utils.url = "github:numtide/flake-utils";
7 };
8
9 outputs = { self, nixpkgs, flake-utils }:
10 flake-utils.lib.eachDefaultSystem (system:
11 let
12 pkgs = nixpkgs.legacyPackages.${system};
13 lib = pkgs.lib;
14 versionBase = lib.strings.removeSuffix "\n" (builtins.readFile ./VERSION);
15 gitRev = "${self.shortRev or self.dirtyShortRev or "dirty"}";
16 version = "${versionBase}+g${gitRev}";
17 in {
18 packages = rec {
19 default = jstest-gtk;
20
21 jstest-gtk = pkgs.stdenv.mkDerivation {
22 pname = "jstest-gtk";
23 inherit version;
24
25 src = nixpkgs.lib.cleanSource ./.;
26
27 nativeBuildInputs = with pkgs; [
28 cmake
29 pkg-config
30 ];
31
32 buildInputs = with pkgs; [
33 gtkmm3
34 udev
35 ];
36
37 cmakeFlags = [
38 "-DPROJECT_VERSION_FULL=${version}"
39 ];
40
41 meta = with lib; {
42 description = "Simple GTK joystick tester and calibrator for the Linux joydev interface";
43 homepage = "https://github.com/Grumbel/jstest-gtk";
44 license = licenses.gpl3Plus;
45 platforms = platforms.linux;
46 mainProgram = "jstest-gtk";
47 };
48 };
49 };
50
51 apps = rec {
52 default = jstest-gtk;
53
54 jstest-gtk = {
55 type = "app";
56 program = "${self.packages.${system}.jstest-gtk}/bin/jstest-gtk";
57 meta = {
58 description = self.packages.${system}.jstest-gtk.meta.description;
59 };
60 };
61 };
62
63 checks = {
64 reuse = pkgs.runCommand "reuse-lint" {
65 src = lib.cleanSource ./.;
66 nativeBuildInputs = [ pkgs.reuse ];
67 } ''
68 cp -rT "$src" src
69 chmod -R u+w src
70 cd src
71 reuse lint
72 mkdir "$out"
73 '';
74 };
75 }
76 );
77 }