Commit Graph

34 Commits

Author SHA1 Message Date
Maximilian Bosch
8bc5104a6e
treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Artturin
c01f509e44 treewide: source .attrs in builders
if theres a source $stdenv then this is needed

for structuredAttrs
2022-12-08 21:09:02 +02:00
Yarny0
0d36fdc66b samsung-unified-linux-driver (cups driver): call {pre,post}Install
Add `preInstall` and `postInstall` to the `installPhase` to
permit package overrides to add commands to the install phase.

Suggested by r-rmcgibbo bot in
https://github.com/NixOS/nixpkgs/pull/133537#issuecomment-897437621
2022-11-06 19:28:16 +01:00
Yarny0
bafefd7ae2 samsung-unified-linux-driver (cups driver): patch all filters
ppd files in the `samsung-unified-linux-driver`
package invoke these filter commands:

* pstosecps
* pstospl
* rastertospl
* pstosplc

The paths to all of those commands excluding the last one got
patched with their absolute paths during the build process.
This commit adds the last one to
the list of commands to be patched.
2022-11-06 16:19:23 +01:00
Yarny0
bfe3271fc0 samsung-unified-linux-driver (cups driver): use patchPpdFilesHook
The `sed` script in the `installPhase` is removed.
Instead, the setup hook `patchPpdFilesHook` is
used to patch the path to the filter executables.

The result should essentially be the same.
Comparing the generated ppd files showed no difference,
short of the package's hash in the absolute paths and
added newline characters at the end of some ppd files.
Missing newline characters at the end of the last line are
apparently added by `awk`; this shouldn't affect functionality.
The new package also contains a `propagated-build-inputs`
file which propagates the package itself.
This ensures the package is available whenever
a ppd file is singled out by another package.
2022-11-06 16:19:23 +01:00
AndersonTorres
3888878db6 samsung cups driver: remove tohl from meta.maintainers list
Because tohl disappeared (last seen 2021-01-28).
2022-10-23 11:30:39 -03:00
Robert Scott
eb6cce7d6f treewide/misc: add sourceType binaryNativeCode for more packages 2022-06-17 22:55:24 +01:00
Rick van Schijndel
d14b6e65ff samsung-unified-linux-driver_4_00_39: drop
Broken since 2018-10-03
2022-05-11 19:23:05 +02:00
Ben Siraphob
badf51221d treewide: stdenv.lib -> lib 2021-01-16 17:58:11 +07:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Jan Tojnar
e89e2edc73
libusb-compat-0_1: rename from libusb 2020-04-28 05:33:41 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Tomas Hlavaty
728689a336 samsung-unified-linux-driver_1_00_36: init at 1.00.36 2019-03-11 21:42:53 +01:00
Peter Simons
929ad8e996 samsung-unified-linux-driver: update default version to 4.01.17
* Version 4.01.17 works fine for me on NixOS, driving both a Samsung ML-2165w
   and a Samsung ML-2510 printer successfully.

 * Version 4.00.39 is broken. The build shows errors, but doesn't abort. The
   generated binaries don't work, because they are lacking rpaths to their
   library dependencies.

 * Renamed old default.nix file to 1.00.37.nix. That version wasn't the default
   and it feels like a bad idea to mix versioned and unversioned file names in
   the same directory.
2018-10-03 10:25:46 +02:00
Will Dietz
eb91037e7b tree-wide: patchelf used during build -> nativeBuildInputs
In a few cases it wasn't clear so I left them as-is.

While visiting these moved other things to nativeBuildInputs
when it was clear they were one of these cases:

* makeWrapper
* archive utilities (in order to unpack src)
  * a few of these might no longer be needed but leaving for another day
2018-09-28 11:43:16 -05:00
John Ericson
2c2f1e37d4 reewide: Purge all uses stdenv.system and top-level system
It is deprecated and will be removed after 18.09.
2018-08-30 17:20:32 -04:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Tobias Geerinckx-Rice
0f84673f3d
Remove nckx as a maintainer for all packages
Goodbye, and thanks for all the Nix...
2018-01-16 23:00:49 +01:00
David Waern
3a084a80e7
samsung-unified-linux-drive: Fix sane driver by patching rpaths
fixes #25779
2017-05-20 15:35:00 +01:00
Vladimír Čunát
50fadc8b18
cups: split the $lib output
This saves > 10 MB from most closures.
Printing test succeeds on x86_64-linux.
2017-03-12 18:36:30 +01:00
Kier Davis
9f4114a740
samsung-unified-linux-driver_1_00_37: fix build failing due to upstream change in 'cups'
This commit should fix the package building to build due to https://github.com/NixOS/nixpkgs/issues/16238

Printing tested on M2875FD and M2675FN models. Scanning not tested yet due to lack of access of Samsung scanning devices.

All work in this commit is attributed to @jokogr. Content of this commit is basically copied+pasted from c41e771a38
2016-11-02 15:13:46 +00:00
Ioannis Koutras
270365a1ee samsung-unified-linux-driver: add 4.01.17 2016-11-01 19:19:53 +02:00
Tuomas Tynkkynen
f410ec16c4 treewide: Fix output references to cups 2016-08-23 04:52:13 +03:00
Tuomas Tynkkynen
51ad423716 treewide: Use makeLibraryPath in 'patchelf --set-rpath' calls 2016-08-23 00:04:39 +03:00
pngwjpgh
17e8032adb samsung-UnifiedLinuxDriver: fix multi-output cups (#16421) 2016-07-01 00:29:56 +02:00
Tobias Geerinckx-Rice
af911744fd samsung-unified-linux-driver: add 1.00.37
Very experimental. Probably very broken. Adds support for newer
models but removes it for some older ones.

Hence not the default yet, if ever.
2016-01-26 04:09:36 +01:00
Tobias Geerinckx-Rice
9fb8020e4e Add version attribute where maintainers |= nckx
This will probably be mandatory soon, and is a step in the right
direction. Removes the deprecated meta.version, and move some meta
sections to the end of the file where I should have put them in
the first place.
2016-01-25 17:35:21 +01:00
Tobias Geerinckx-Rice
eecb59a805 samsungUnifiedLinuxDriver 0.92 -> 4.00.39
This not the latest, but the greatest version (by number of models still
supported).

A big bump. Everything seems to work fine. Tested with a Samsung CLP-325.
Also fixed some strange things. Did this ever even work? On x86_64?
2015-04-01 19:54:40 +02:00
Nikolay Amiantov
0c5169b536 samsung-UnifiedLinuxDriver: fix meta 2015-03-05 20:49:45 +03:00
John Wiegley
28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00
Evgeny Egorochkin
0eecd67d14 Package Samsung unified printer driver. i686 only but apparently can be improved to support x86_64. Based on patch by James Cook <james.cook[NOSPAM]@utoronto.ca> 2012-12-05 05:43:19 +02:00