From 37592951e82b06f236e74bb39077650a17bb7f19 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 29 Sep 2021 05:05:26 +0200 Subject: [PATCH] use flake for polygon-art --- flake.lock | 2 +- nixos/configs/sterni/packages.nix | 2 +- nixos/flake.lock | 55 ++++++++++++++++---- nixos/flake.nix | 8 ++- nixos/pkgs/default.nix | 2 +- nixos/pkgs/polygon-art/default.nix | 36 ------------- nixos/system/desktop/home-manager/xmonad.nix | 2 +- 7 files changed, 57 insertions(+), 50 deletions(-) delete mode 100644 nixos/pkgs/polygon-art/default.nix diff --git a/flake.lock b/flake.lock index 7e58efd..c7e6efb 100644 --- a/flake.lock +++ b/flake.lock @@ -62,7 +62,7 @@ "secrets": { "flake": false, "locked": { - "narHash": "sha256-GsEG/ZN4MRC7j2EkXlDD5bnYTpEW26D3P/Lgz/XWV78=", + "narHash": "sha256-MW7SCJb32fcfIagCbaTaRbkzEmwcQ+xdGByFJZjGZ94=", "path": "/home/palo/dev/secrets", "type": "path" }, diff --git a/nixos/configs/sterni/packages.nix b/nixos/configs/sterni/packages.nix index e5bc6bc..ce5873f 100644 --- a/nixos/configs/sterni/packages.nix +++ b/nixos/configs/sterni/packages.nix @@ -25,7 +25,7 @@ in { #zeal # offline documentation #keepassxc sweethome3d.application - polygon-art + pkgs.polygon-art.polygon-art # bluetooth gui blueberry diff --git a/nixos/flake.lock b/nixos/flake.lock index ffddc06..cbcdd40 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -214,6 +214,21 @@ "type": "github" } }, + "flake-utils_2": { + "locked": { + "lastModified": 1631561581, + "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -270,11 +285,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1632418649, - "narHash": "sha256-4rZspkiQU7zbsuciRRMgoEPkAF/+FSv2jx/VIPxPVx4=", + "lastModified": 1632639184, + "narHash": "sha256-fRLxre+gPxIkjFVj17O68pyAWU1cxT20XFOiulIWzRw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "056a3c1fae30d06d14b171b9023743c21a23ec1a", + "rev": "fd8a7fd07da0f3fc0e27575891f45c2f88e5dd44", "type": "github" }, "original": { @@ -286,11 +301,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1632411313, - "narHash": "sha256-lekODc44lVo9/0EwGiX6LoEt2KhiPdcfNopealMJ7n4=", + "lastModified": 1632660378, + "narHash": "sha256-sjA8eQlnyDjDLyAyq3XlJmN0nqW0ftl/pb7VnMg86L0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "51bcdc4cdaac48535dabf0ad4642a66774c609ed", + "rev": "31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497", "type": "github" }, "original": { @@ -412,6 +427,27 @@ "type": "github" } }, + "polygon-art": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1632864707, + "narHash": "sha256-aKYFPoMlTVovXk8fM7KZOc1HhusF/PEFEV9haBMJvuA=", + "ref": "master", + "rev": "b39c539f9e720cc144c9ad7fe0d72cd46f793dab", + "revCount": 22, + "type": "git", + "url": "https://git.ingolf-wagner.de/palo/polygon-art.git" + }, + "original": { + "type": "git", + "url": "https://git.ingolf-wagner.de/palo/polygon-art.git" + } + }, "revealjs": { "flake": false, "locked": { @@ -437,6 +473,7 @@ "krops-lib": "krops-lib", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", + "polygon-art": "polygon-art", "sops-nix": "sops-nix" } }, @@ -461,11 +498,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1632602278, - "narHash": "sha256-BJNUsxR+YwqCXMojsCK1gOnoxkLdJx5zqSYL1VMxws8=", + "lastModified": 1632832687, + "narHash": "sha256-y7Us3d32vJl2TRQXUDQqSmLIP+k2z1Sn4vTaKL7VE44=", "owner": "Mic92", "repo": "sops-nix", - "rev": "38e9270b774e50263ae1771922d7e4ff7d543aed", + "rev": "8c5c313b562edee5a6ec2e118256a72710cc08b2", "type": "github" }, "original": { diff --git a/nixos/flake.nix b/nixos/flake.nix index e3eca72..03b5416 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -4,6 +4,11 @@ sops-nix.url = "github:Mic92/sops-nix"; nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + polygon-art = { + #url = "path:/home/palo/dev/polygon-art"; + url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git"; + #inputs.nixpkgs.follows = "nixpkgs"; + }; doom-emacs-nix = { url = "github:vlaci/nix-doom-emacs"; inputs.nixpkgs.follows = "nixpkgs"; @@ -28,7 +33,7 @@ }; outputs = { self, sops-nix, nixpkgs, home-manager, doom-emacs-nix - , backup-module, nixpkgs-unstable, krops-lib, cluster-module, ... }: + , backup-module, nixpkgs-unstable, krops-lib, cluster-module, polygon-art, ... }: let nixosSystem = nixpkgs.lib.nixosSystem; @@ -50,6 +55,7 @@ (_self: _super: { # we assign the overlay created before to the overlays of nixpkgs. unstable = nixpkgs-unstable.legacyPackages.${pkgs.system}; + polygon-art = polygon-art.packages.${pkgs.system}; }) ]; }) diff --git a/nixos/pkgs/default.nix b/nixos/pkgs/default.nix index fd65ea4..23b5bbc 100644 --- a/nixos/pkgs/default.nix +++ b/nixos/pkgs/default.nix @@ -11,7 +11,7 @@ in { landingpage = callPackage ./landingpage { }; light-control = callPackage ./light-control { }; otpmenu = callPackage ./otpmenu { }; - polygon-art = super.callPackage ./polygon-art { }; + #polygon-art = super.callPackage ./polygon-art { }; sononym = callPackage ./sononym { }; sononym-crawler = callPackage ./sononym-crawler { }; taskwarrior-hooks = callPackage ./taskwarrior-hooks { }; diff --git a/nixos/pkgs/polygon-art/default.nix b/nixos/pkgs/polygon-art/default.nix deleted file mode 100644 index 27b0ff6..0000000 --- a/nixos/pkgs/polygon-art/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ rustPlatform, fetchgit, lib, cairo, geos, clipper, clang, pkg-config, cmake -, openssl, llvmPackages, ... }: - -rustPlatform.buildRustPackage { - - pname = "polygon-art"; - - version = "1.0.0"; - - # nix-prefetch-git-rendered --rev refs/heads/develop https://git.ingolf-wagner.de/palo/polygon-art.git - src = fetchgit { - url = "https://git.ingolf-wagner.de/palo/polygon-art.git"; - rev = "dfb6e0789ec67ee649050ad3b16d8b6a6b38955d"; - sha256 = "0iqmikvl93pazxfd120hcr0waxav7zy6px5kmdqxifrjgdbda9xx"; - }; - - #cargoSha256 = "05rkn8iihj4j9k179xx7wn2a07hxks050raj6fbxmj6gdx6aj170"; - cargoSha256 = "0sgk4hw77cxqbqzd258fz67r7fpjblkm7cqh14n5f1c43y8vgxa0"; - verifyCargoDeps = true; - - # Needed so bindgen can find libclang.so - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; - - buildInputs = [ cairo geos clipper openssl ]; - - nativeBuildInputs = - [ cmake llvmPackages.clang llvmPackages.libclang pkg-config ]; - - meta = with lib; { - description = "Framework with examples to generate plotter friendly SVGs"; - homepage = "https://git.ingolf-wagner.de/palo/polygon-art.git"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.mrVanDalo ]; - }; -} - diff --git a/nixos/system/desktop/home-manager/xmonad.nix b/nixos/system/desktop/home-manager/xmonad.nix index 3d8b793..1114be5 100644 --- a/nixos/system/desktop/home-manager/xmonad.nix +++ b/nixos/system/desktop/home-manager/xmonad.nix @@ -19,7 +19,7 @@ let nixStartRedshift = "${pkgs.redshift}/bin/redshift -O 6100 -g 0.9:0.9:0.9 -b 0.9" nixResetRedshift = "${pkgs.redshift}/bin/redshift -x" nixSetCursorImage = "${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr" - nixSetBackground = "${pkgs.polygon-art}/bin/rings --height ${ + nixSetBackground = "${pkgs.polygon-art.polygon-art}/bin/rings --height ${ toString height } --width ${ toString width