Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fxlinuxprintutil: init at 1.1.1-1 #65250

Merged
merged 1 commit into from Jul 22, 2019
Merged

Conversation

delan
Copy link
Member

@delan delan commented Jul 22, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Screenshot_at_2019-07-22-17-27-09
Screenshot_at_2019-07-22-17-27-31

curlOpts = "--user-agent Mozilla/5.0"; # HTTP 410 otherwise
};

patches = [ ./fxlputil.patch ./fxlputil.tcl.patch ./fxlocalechk.tcl.patch ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think I can appropriately review patches for tcl. did you author them @delan?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah those were my own — fxlputil.tcl.patch replaces the code that looks for Tcl packages in the working directory and /usr/lib or /usr/lib64 with /nix/store/fxlinuxprintutil/lib, while fxlocalechk.tcl.patch replaces the code that looks for X11’s locale.alias in /usr/share/X11/locale or /usr/lib/X11/locale with /nix/store/libX11/share/X11/locale

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Launched fxlputil successfully.

Please squash.

@worldofpeace
Copy link
Contributor

Oops, sorry just seeing #65250 (comment).

Can you add comment in the nix expression describing the patches or even in the patches?

@delan
Copy link
Member Author

delan commented Jul 22, 2019

no worries 😄

diff --git a/pkgs/misc/cups/drivers/fxlinuxprintutil/default.nix b/pkgs/misc/cups/drivers/fxlinuxprintutil/default.nix
index 8082dd1857f..7965b591afb 100644
--- a/pkgs/misc/cups/drivers/fxlinuxprintutil/default.nix
+++ b/pkgs/misc/cups/drivers/fxlinuxprintutil/default.nix
@@ -16,8 +16,16 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
+    # replaces references to “path/to/fxlputil” via $0 that are broken by our wrapProgram
+    # with /nix/store/fxlinuxprintutil/bin/fxlputil
     ./fxlputil.patch
+
+    # replaces the code that looks for Tcl packages in the working directory and /usr/lib
+    # or /usr/lib64 with /nix/store/fxlinuxprintutil/lib
     ./fxlputil.tcl.patch
+
+    # replaces the code that looks for X11’s locale.alias in /usr/share/X11/locale or
+    # /usr/lib/X11/locale with /nix/store/libX11/share/X11/locale
     (substituteAll {
       src = ./fxlocalechk.tcl.patch;
       inherit (xorg) libX11;

@delan
Copy link
Member Author

delan commented Jul 22, 2019

moved misc/cups/drivers/fxlinuxprintutil to misc/cups/fxlinuxprintutil

diff --git a/pkgs/misc/cups/drivers/fxlinuxprintutil/default.nix b/pkgs/misc/cups/fxlinuxprintutil/default.nix
similarity index 100%
rename from pkgs/misc/cups/drivers/fxlinuxprintutil/default.nix
rename to pkgs/misc/cups/fxlinuxprintutil/default.nix
diff --git a/pkgs/misc/cups/drivers/fxlinuxprintutil/fxlocalechk.tcl.patch b/pkgs/misc/cups/fxlinuxprintutil/fxlocalechk.tcl.patch
similarity index 100%
rename from pkgs/misc/cups/drivers/fxlinuxprintutil/fxlocalechk.tcl.patch
rename to pkgs/misc/cups/fxlinuxprintutil/fxlocalechk.tcl.patch
diff --git a/pkgs/misc/cups/drivers/fxlinuxprintutil/fxlputil.patch b/pkgs/misc/cups/fxlinuxprintutil/fxlputil.patch
similarity index 100%
rename from pkgs/misc/cups/drivers/fxlinuxprintutil/fxlputil.patch
rename to pkgs/misc/cups/fxlinuxprintutil/fxlputil.patch
diff --git a/pkgs/misc/cups/drivers/fxlinuxprintutil/fxlputil.tcl.patch b/pkgs/misc/cups/fxlinuxprintutil/fxlputil.tcl.patch
similarity index 100%
rename from pkgs/misc/cups/drivers/fxlinuxprintutil/fxlputil.tcl.patch
rename to pkgs/misc/cups/fxlinuxprintutil/fxlputil.tcl.patch
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 851f5b0133f..8d63a12e629 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -23912,7 +23912,6 @@ in
   brlaser = callPackage ../misc/cups/drivers/brlaser { };
 
   fxlinuxprint = callPackage ../misc/cups/drivers/fxlinuxprint { };
-  fxlinuxprintutil = callPackage ../misc/cups/drivers/fxlinuxprintutil { };
 
   brscan4 = callPackage ../applications/graphics/sane/backends/brscan4 { };
 
@@ -23957,6 +23956,8 @@ in
 
   splix = callPackage ../misc/cups/drivers/splix { };
 
+  fxlinuxprintutil = callPackage ../misc/cups/fxlinuxprintutil { };
+
   steamcontroller = callPackage ../misc/drivers/steamcontroller { };
 
   stern = callPackage ../applications/networking/cluster/stern { };

@delan
Copy link
Member Author

delan commented Jul 22, 2019

moved misc/cups/fxlinuxprintutil to tools/misc/fxlinuxprintutil

diff --git a/pkgs/misc/cups/fxlinuxprintutil/default.nix b/pkgs/tools/misc/fxlinuxprintutil/default.nix
similarity index 100%
rename from pkgs/misc/cups/fxlinuxprintutil/default.nix
rename to pkgs/tools/misc/fxlinuxprintutil/default.nix
diff --git a/pkgs/misc/cups/fxlinuxprintutil/fxlocalechk.tcl.patch b/pkgs/tools/misc/fxlinuxprintutil/fxlocalechk.tcl.patch
similarity index 100%
rename from pkgs/misc/cups/fxlinuxprintutil/fxlocalechk.tcl.patch
rename to pkgs/tools/misc/fxlinuxprintutil/fxlocalechk.tcl.patch
diff --git a/pkgs/misc/cups/fxlinuxprintutil/fxlputil.patch b/pkgs/tools/misc/fxlinuxprintutil/fxlputil.patch
similarity index 100%
rename from pkgs/misc/cups/fxlinuxprintutil/fxlputil.patch
rename to pkgs/tools/misc/fxlinuxprintutil/fxlputil.patch
diff --git a/pkgs/misc/cups/fxlinuxprintutil/fxlputil.tcl.patch b/pkgs/tools/misc/fxlinuxprintutil/fxlputil.tcl.patch
similarity index 100%
rename from pkgs/misc/cups/fxlinuxprintutil/fxlputil.tcl.patch
rename to pkgs/tools/misc/fxlinuxprintutil/fxlputil.tcl.patch
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8d63a12e629..1dff6fdf6d4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -782,6 +782,8 @@ in
 
   ezstream = callPackage ../tools/audio/ezstream { };
 
+  fxlinuxprintutil = callPackage ../tools/misc/fxlinuxprintutil { };
+
   genymotion = callPackage ../development/mobile/genymotion { };
 
   gamecube-tools = callPackage ../development/tools/gamecube-tools { };
@@ -23956,8 +23958,6 @@ in
 
   splix = callPackage ../misc/cups/drivers/splix { };
 
-  fxlinuxprintutil = callPackage ../misc/cups/fxlinuxprintutil { };
-
   steamcontroller = callPackage ../misc/drivers/steamcontroller { };
 
   stern = callPackage ../applications/networking/cluster/stern { };

@worldofpeace worldofpeace merged commit 1e06e1d into NixOS:master Jul 22, 2019
@delan delan deleted the fxlinuxprintutil branch July 22, 2019 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants