From fd982f15e4535477e1a9ba23beb227e85284c4a8 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 7 Oct 2024 16:57:51 +0200 Subject: [PATCH] nix: move package to nixpkgs --- .github/workflows/nix.yml | 18 +- default.nix | 49 ----- flake.lock | 419 +------------------------------------- flake.nix | 45 ++-- 4 files changed, 34 insertions(+), 497 deletions(-) delete mode 100644 default.nix diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 9488350..cc47550 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -1,6 +1,7 @@ -name: "Nix CI" +name: "CI - Nix" -on: [pull_request, push] +on: + push: jobs: tests: @@ -11,10 +12,9 @@ jobs: os: [ubuntu] steps: - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - run: nix --accept-flake-config build -L - - run: nix --accept-flake-config run .#cachix push gepetto $(readlink result) - if: github.repository_owner == 'humanoid-path-planner' - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} + - 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/default.nix b/default.nix deleted file mode 100644 index 10d274a..0000000 --- a/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - stdenv, - cmake, - gepetto-viewer-corba, - hpp-manipulation-corba, - pkg-config, - libsForQt5, -}: - -stdenv.mkDerivation { - pname = "hpp-gui"; - version = "5.0.0"; - - src = lib.fileset.toSource { - root = ./.; - fileset = lib.fileset.unions [ - ./CMakeLists.txt - ./doc - ./etc - ./package.xml - ./plugins - ./pyplugins - ./res - ]; - }; - - strictDeps = true; - - nativeBuildInputs = [ - cmake - libsForQt5.wrapQtAppsHook - pkg-config - ]; - buildInputs = [ libsForQt5.qtbase ]; - propagatedBuildInputs = [ - gepetto-viewer-corba - hpp-manipulation-corba - ]; - - doCheck = true; - - meta = { - description = "Qt based GUI for HPP project"; - homepage = "https://github.com/humanoid-path-planner/hpp-gui"; - license = lib.licenses.bsd2; - maintainers = [ lib.maintainers.nim65s ]; - }; -} diff --git a/flake.lock b/flake.lock index 051cd1a..291df13 100644 --- a/flake.lock +++ b/flake.lock @@ -20,425 +20,17 @@ "type": "github" } }, - "hpp-constraints": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "flake-parts" - ], - "hpp-pinocchio": "hpp-pinocchio", - "hpp-statistics": "hpp-statistics", - "hpp-util": "hpp-util", - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719584695, - "narHash": "sha256-8K94IgUt8kpdRDASnstfX14cBQN4ZK6+LmvOuq6Sg0I=", - "owner": "humanoid-path-planner", - "repo": "hpp-constraints", - "rev": "acd1c62fdfcdb329fd0dea19ae2f18e471e3ef08", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-constraints", - "type": "github" - } - }, - "hpp-corbaserver": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "flake-parts" - ], - "hpp-core": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core" - ], - "hpp-template-corba": "hpp-template-corba", - "hpp-util": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "hpp-util" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719670731, - "narHash": "sha256-1EKv+2sWT3XNrqI+YhJwxrE0Zq77D9k96vnhYJl4KX4=", - "owner": "humanoid-path-planner", - "repo": "hpp-corbaserver", - "rev": "ab24564c4165f51017bf00c84dc8c16c239ba1fe", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-corbaserver", - "type": "github" - } - }, - "hpp-core": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "flake-parts" - ], - "hpp-constraints": "hpp-constraints", - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719586831, - "narHash": "sha256-oRFZsERQKzaW2NvgcKcxqJZtqtlk7rqDK2inhUTABiQ=", - "owner": "humanoid-path-planner", - "repo": "hpp-core", - "rev": "733f884a03cde41aeae18758a26b28cf6fdf02fa", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-core", - "type": "github" - } - }, - "hpp-environments": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "hpp-pinocchio", - "flake-parts" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "hpp-pinocchio", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719580427, - "narHash": "sha256-T76zgTJrGm7maKBPwgX+FgQ7MPN7NoLvdZvzARPo9V0=", - "owner": "humanoid-path-planner", - "repo": "hpp-environments", - "rev": "1c727bcc85145a1f5236357fa73df5a183a31f04", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-environments", - "type": "github" - } - }, - "hpp-manipulation": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "flake-parts" - ], - "hpp-core": "hpp-core", - "hpp-universal-robot": "hpp-universal-robot", - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719740235, - "narHash": "sha256-+Hh4mck3oz1Xr6JXe8yjDD0tvtVW2allIBl8I2LKm0w=", - "owner": "humanoid-path-planner", - "repo": "hpp-manipulation", - "rev": "770860668e3504dd8b039aa0518e6b50ac3936da", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-manipulation", - "type": "github" - } - }, - "hpp-manipulation-corba": { - "inputs": { - "flake-parts": [ - "flake-parts" - ], - "hpp-corbaserver": "hpp-corbaserver", - "hpp-manipulation-urdf": "hpp-manipulation-urdf", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719773112, - "narHash": "sha256-QTD+aXURL+dCG3ZbFH4Q2X6TQhOP8sq11xkWtKCM5EU=", - "owner": "humanoid-path-planner", - "repo": "hpp-manipulation-corba", - "rev": "2095617a8d31310c4d5b6b9fb7ff30311f9af16e", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "repo": "hpp-manipulation-corba", - "type": "github" - } - }, - "hpp-manipulation-urdf": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "flake-parts" - ], - "hpp-manipulation": "hpp-manipulation", - "nixpkgs": [ - "hpp-manipulation-corba", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719741779, - "narHash": "sha256-8tO8rElefStu4Hmbn4TqB3ZCSkVjQBk8ww7zKcbkNIc=", - "owner": "humanoid-path-planner", - "repo": "hpp-manipulation-urdf", - "rev": "ab664c2cdf43b7816cf35ee422cc8da3b0da148b", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-manipulation-urdf", - "type": "github" - } - }, - "hpp-pinocchio": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "flake-parts" - ], - "hpp-environments": "hpp-environments", - "hpp-util": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "hpp-util" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719582071, - "narHash": "sha256-sRWf973UZIdyrS0fhd+vXdTucR9d7Eks9yU85kcFxfo=", - "owner": "humanoid-path-planner", - "repo": "hpp-pinocchio", - "rev": "4ec6186223ce18f4c48605421a7ef583fe827352", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-pinocchio", - "type": "github" - } - }, - "hpp-statistics": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "flake-parts" - ], - "hpp-util": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "hpp-util" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719582334, - "narHash": "sha256-bzGI7z6hTGkuNs71Vcb3vsVpey1SuR7Okx4rJU1LHFs=", - "owner": "humanoid-path-planner", - "repo": "hpp-statistics", - "rev": "613b1f9c2788cb33097c1f1c0e4216420665a1e0", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-statistics", - "type": "github" - } - }, - "hpp-template-corba": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-corbaserver", - "flake-parts" - ], - "hpp-util": [ - "hpp-manipulation-corba", - "hpp-corbaserver", - "hpp-util" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-corbaserver", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719587477, - "narHash": "sha256-bUGCrWnAuEqmhD7sunx+L6yqukHueDs99MbHM7M5/8A=", - "owner": "humanoid-path-planner", - "repo": "hpp-template-corba", - "rev": "e5512a9505df6bc9ae317d51e3e14cdc27d6583e", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-template-corba", - "type": "github" - } - }, - "hpp-universal-robot": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "flake-parts" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719670288, - "narHash": "sha256-9gi96DhSqvAHlXUlTs6O7TG/3dTthL2LETHb1rqP75A=", - "owner": "humanoid-path-planner", - "repo": "hpp-universal-robot", - "rev": "d9308abb98b864da8ab1041f66f6c78aef2e8d53", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-universal-robot", - "type": "github" - } - }, - "hpp-util": { - "inputs": { - "flake-parts": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "flake-parts" - ], - "nixpkgs": [ - "hpp-manipulation-corba", - "hpp-manipulation-urdf", - "hpp-manipulation", - "hpp-core", - "hpp-constraints", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719580825, - "narHash": "sha256-trfl8A+P7a1gnACnTXNK98TYWWDAOM3PKfkXxpC3X/8=", - "owner": "humanoid-path-planner", - "repo": "hpp-util", - "rev": "0504f15818a92c7a257cd6b60cd8b6092bd6dbfa", - "type": "github" - }, - "original": { - "owner": "humanoid-path-planner", - "ref": "release/5.1.0", - "repo": "hpp-util", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1719674427, - "narHash": "sha256-z2hCpVyfnmYTA5iabf1SW4peFV9itE1JJcXNBKIFkDg=", - "owner": "nim65s", + "lastModified": 1727174734, + "narHash": "sha256-xa3TynMF5vaWonmTOg/Ejc1Fmo0GkQnCaVRVkBc3z2I=", + "owner": "gepetto", "repo": "nixpkgs", - "rev": "b81610d293fac26c2ec6a81718a979bc25f8c155", + "rev": "0ad139a0e4372abc12320c8c92ee90e0e5e296e1", "type": "github" }, "original": { - "owner": "nim65s", - "ref": "gepetto", + "owner": "gepetto", "repo": "nixpkgs", "type": "github" } @@ -446,7 +38,6 @@ "root": { "inputs": { "flake-parts": "flake-parts", - "hpp-manipulation-corba": "hpp-manipulation-corba", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 7b0dd73..a6a0962 100644 --- a/flake.nix +++ b/flake.nix @@ -1,28 +1,17 @@ { description = "Qt based GUI for HPP project"; - nixConfig = { - extra-substituters = [ "https://gepetto.cachix.org" ]; - extra-trusted-public-keys = [ "gepetto.cachix.org-1:toswMl31VewC0jGkN6+gOelO2Yom0SOHzPwJMY2XiDY=" ]; - }; - inputs = { - nixpkgs.url = "github:nim65s/nixpkgs/gepetto"; + nixpkgs.url = "github:gepetto/nixpkgs"; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; - hpp-manipulation-corba = { - url = "github:humanoid-path-planner/hpp-manipulation-corba"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-parts.follows = "flake-parts"; - }; }; outputs = - inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ ]; + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" "aarch64-linux" @@ -30,20 +19,26 @@ "x86_64-darwin" ]; perSystem = + { pkgs, self', ... }: { - self', - pkgs, - system, - ... - }: - { + devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; }; packages = { - inherit (pkgs) cachix; - default = pkgs.callPackage ./. { - hpp-manipulation-corba = inputs.hpp-manipulation-corba.packages.${system}.default; - }; + default = self'.packages.hpp-gui; + hpp-gui = pkgs.python3Packages.hpp-gui.overrideAttrs (_: { + src = pkgs.lib.fileset.toSource { + root = ./.; + fileset = pkgs.lib.fileset.unions [ + ./CMakeLists.txt + ./doc + ./etc + ./package.xml + ./plugins + ./pyplugins + ./res + ]; + }; + }); }; - devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; }; }; }; }