From 5e188bb4282ba29577e0fc4f7cf5d953a0605ba7 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Mon, 7 Oct 2024 22:07:32 +0200 Subject: [PATCH] nix --- .github/workflows/nix.yml | 19 +++++++++++++++++++ flake.nix | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/nix.yml create mode 100644 flake.nix diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..52b45d9 --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,19 @@ +name: "CI - Nix" + +on: + push: + +jobs: + nix: + runs-on: "${{ matrix.os }}-latest" + strategy: + matrix: + os: [ubuntu, macos] + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 + - uses: cachix/cachix-action@v15 + with: + name: gepetto + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix build -L diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..694a01a --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "An user-friendly Graphical Interface"; + + inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = inputs.nixpkgs.lib.systems.flakeExposed; + perSystem = + { pkgs, self', ... }: + { + devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; }; + packages = { + default = self'.packages.gepetto-viewer-corba; + gepetto-viewer-corba = pkgs.python3Packages.gepetto-viewer-corba.overrideAttrs (_: { + src = pkgs.lib.fileset.toSource { + root = ./.; + fileset = pkgs.lib.fileset.unions [ + ./blender + ./CMakeLists.txt + ./doc + ./examples + ./idl + ./include + ./package.xml + ./plugins + ./src + ./tests + ]; + }; + }); + }; + }; + }; +} -- GitLab