From a7fd48a69fbb148dfcfb3cfe519a0e82598396e5 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 10 Jan 2025 15:22:56 +0100 Subject: [PATCH 1/2] drop nixgl --- .envrc | 10 +------- .github/workflows/ci.yml | 2 +- flake.lock | 50 ---------------------------------------- flake.nix | 33 +++++--------------------- 4 files changed, 8 insertions(+), 87 deletions(-) diff --git a/.envrc b/.envrc index 6d5f841..a5dbbcb 100644 --- a/.envrc +++ b/.envrc @@ -1,9 +1 @@ -if test -f .envrc.local; then - # If you don't need nixgl, eg. if you are n NixOS, you can: - # echo 'use flake .#pure' > .envrc.local - source_env .envrc.local -else - # unfree is only required if you use nvidia - export NIXPKGS_ALLOW_UNFREE=1 - use flake . --impure -fi +use flake . diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f573cec..4cdef76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,4 +19,4 @@ jobs: name: gepetto authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' extraPullNames: ros - - run: nix build -L .#devShells.x86_64-linux.pure + - run: nix build -L .#devShells.x86_64-linux.default diff --git a/flake.lock b/flake.lock index 0367907..4319a2a 100644 --- a/flake.lock +++ b/flake.lock @@ -18,21 +18,6 @@ "type": "github" } }, - "flake-utils_2": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nix-ros-overlay": { "inputs": { "flake-utils": "flake-utils", @@ -53,25 +38,6 @@ "type": "github" } }, - "nixgl": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1713543440, - "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", - "owner": "nix-community", - "repo": "nixGL", - "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixGL", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1733581040, @@ -88,21 +54,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1660551188, - "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, "patch-hpp": { "flake": false, "locked": { @@ -118,7 +69,6 @@ "root": { "inputs": { "nix-ros-overlay": "nix-ros-overlay", - "nixgl": "nixgl", "nixpkgs": [ "nix-ros-overlay", "nixpkgs" diff --git a/flake.nix b/flake.nix index 37d22dd..62969e4 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,6 @@ url = "https://github.com/nim65s/nixpkgs/pull/1.patch"; flake = false; }; - - ## NixGL, for people not yet on NixOS - nixgl.url = "github:nix-community/nixGL"; }; outputs = { nixpkgs, self, ... }@inputs: @@ -21,42 +18,24 @@ let pkgs = import ./patched-nixpkgs.nix { inherit nixpkgs system; - overlays = [ - inputs.nix-ros-overlay.overlays.default - inputs.nixgl.overlay - ]; + overlays = [ inputs.nix-ros-overlay.overlays.default ]; patches = [ inputs.patch-hpp ]; }; - pure-packages = [ - pkgs.colcon - self.packages.${system}.python - self.packages.${system}.ros - ]; in { devShells = { - # Expected base entrypoint. - # This is "pure" + some stuff wrapped by NixGL default = pkgs.mkShell { - name = "Gepetto Main Dev Shell with NixGL"; - packages = pure-packages ++ [ - self.packages.${system}.nixgl-gepetto-gui - ]; - }; - pure = pkgs.mkShell { name = "Gepetto Main Dev Shell"; - packages = pure-packages; + packages = [ + pkgs.colcon + self.packages.${system}.python + self.packages.${system}.ros + ]; }; }; packages = { - nixgl-gepetto-gui = - with pkgs; - writeShellApplication { - name = "nixgl-gepetto-gui"; - text = "${lib.getExe' nixgl.auto.nixGLDefault "nixGL"} ${lib.getExe python3Packages.gepetto-gui}"; - }; python = pkgs.python3.withPackages (p: [ p.crocoddyl p.gepetto-gui From f07caafb6b4922851fab7c9ae7b1567ebd88f0f4 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 10 Jan 2025 16:05:49 +0100 Subject: [PATCH 2/2] document nix-system-graphics --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 143f716..f814894 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,7 @@ The goal is to make use of ros.cachix.org, but right now (2024-12-09), this is c Use this project with direnv. If the default devShell does not suit your use case, you can define your own `.envrc.local` + +## GUI issues on non-NixOS distros + +Please try