Pi66

walrs
pywal but if its Fast-Minimal-Simple
git clone https://git.pi66.xyz/walrs

← back to log

fix nix package

author: pixel2175
date: 2025-06-06 05:06
hash: dcb43a9792bbfffe3173dc936a1276cec91fb77f

Diffstat:

M

flake.nix
51 +-----------------------------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
diff --git a/flake.nix b/flake.nix
index 41b2498..7be9b26 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,5 +1,5 @@
 {
-  description = "walrs CLI tool";
+  description = "Generate colorscheme from image";
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
     flake-utils.url = "github:numtide/flake-utils";
@@ -11,38 +11,16 @@
       in {
         packages.default = pkgs.rustPlatform.buildRustPackage rec {
           pname = "walrs";
-          version = "1.1.2";
+          version = "1.1.3";
           src = ./.;

           cargoHash = "sha256-ItjbG/fPAW1mDJI5JXZ73L4c3UeDZzjBdADsyWhqzm8=";         
           nativeBuildInputs = with pkgs; [ bash ];

-          # Allow unstable Rust features
           preBuild = ''
             export RUSTC_BOOTSTRAP=1
           '';

-          # Install everything to the Nix store first
-          postInstall = ''
-            # Install config files to result/
-            mkdir -p $out/etc/walrs/{templates,scripts,colorschemes}
-            
-            if [ -d "templates" ]; then
-              cp -r templates/* $out/etc/walrs/templates/ || true
-            fi
-            if [ -d "scripts" ]; then
-              cp -r scripts/* $out/etc/walrs/scripts/ || true
-            fi
-            if [ -d "colorschemes" ]; then
-              cp -r colorschemes/* $out/etc/walrs/colorschemes/ || true
-            fi
-            
-            # Install man page
-            if [ -f "walrs.1" ]; then
-              install -Dm644 walrs.1 $out/share/man/man1/walrs.1
-            fi
-          '';
-          
           meta = with pkgs.lib; {
             description = "Generate colorscheme from image";
             license = licenses.gpl3;
@@ -50,30 +28,5 @@
           };
         };

-        # Create installer that copies from result/ to system locations
-        packages.install-system = pkgs.writeShellScriptBin "walrs-install-system" ''
-          set -e
-          WALRS_PACKAGE="<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>s</mi><mi>e</mi><mi>l</mi><mi>f</mi><mo>&#x0002E;</mo><mi>p</mi><mi>a</mi><mi>c</mi><mi>k</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>s</mi><mo>&#x0002E;</mo></mrow></mrow></math>{system}.default}"
-          
-          echo "Installing walrs from Nix store to system locations..."
-          
-          # Install binary
-          sudo install -m755 "$WALRS_PACKAGE/bin/walrs" /usr/local/bin/walrs
-          
-          # Install config files from result/etc/walrs/ to /etc/walrs/
-          sudo mkdir -p /etc/walrs
-          if [ -d "$WALRS_PACKAGE/etc/walrs" ]; then
-            sudo cp -r "$WALRS_PACKAGE/etc/walrs"/* /etc/walrs/
-          fi
-          
-          # Install man page
-          if [ -f "$WALRS_PACKAGE/share/man/man1/walrs.1" ]; then
-            sudo install -Dm644 "$WALRS_PACKAGE/share/man/man1/walrs.1" /usr/share/man/man1/walrs.1
-          fi
-          
-          echo "✓ walrs installed to /usr/local/bin/walrs"
-          echo "✓ Configuration files installed to /etc/walrs/"
-          echo "✓ Man page installed to /usr/share/man/man1/walrs.1"
-        '';
       });
 }