# Trying to apply DLC for a game installed by Guix (help!)

**URL:** <https://forum.systemcrafters.net/t/trying-to-apply-dlc-for-a-game-installed-by-guix-help/659>\
**Category:** Guix\
**Created:** [May 6, 2024, 4:47am UTC](https://forum.systemcrafters.net/t/trying-to-apply-dlc-for-a-game-installed-by-guix-help/659 "2024-05-06T04:47:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parenthetical](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/parenthetical/32/456_2.png) [@parenthetical](https://forum.systemcrafters.net/u/parenthetical)\
**Post date:** [May 6, 2024, 4:47am UTC](https://forum.systemcrafters.net/t/trying-to-apply-dlc-for-a-game-installed-by-guix-help/659/1 "2024-05-06T04:47:34Z")

</div>

Trying to apply DLC for a game installed by Guix (Help!)

Here is my my dilemma:  
There is a game in the Guix repository called tome4. This game has DLC that can be obtained through the [te4.org](http://te4.org) website, which i have. The directory where the game looks for the DLC is located in the store, so i can’t just drop the files there like i normally would on any other system. I’ve downloaded the game’s source from the website (the same place that is specified in the tome4 package definition), uncompressed it, added the DLC to the correct directory, recompressed, tried specifying this file on my machine instead of the file at [te4.org](http://te4.org) in a new tome4.scm (this is where i really start to get lost), and then tried to pass the new tome4.scm to guix to install it.

1. Am i even going about this in the right way?
2. How do i designate a file path on my machine instead of a URL within a package definition?
3. How do i install a package from a .scm file containing a package defintion that i’ve created or modified?

Here is the tome4 package defintion for reference:  
[tome4.scm](https://forum.systemcrafters.net/uploads/short-url/qTh4pbopiKUbvXnbbCmI4tZGCmH.scm) (4.6 KB)

---

<div class="post-metadata">

**Author:** ![mrok](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mrok](https://forum.systemcrafters.net/u/mrok)\
**Post date:** [May 9, 2024, 11:24pm UTC](https://forum.systemcrafters.net/t/trying-to-apply-dlc-for-a-game-installed-by-guix-help/659/2 "2024-05-09T23:24:43Z")

</div>

First of all, guix has excellent built-in capabilities for modifying existing packages.  
Perhaps the easiest way is to use [package transformation options](https://guix.gnu.org/en/manual/devel/en/html_node/Package-Transformation-Options.html):

```Shell
guix install tome4 --with-source=file:///home/user/random-directory/tome4.tar.gz

```

The other way is to define [package variants](https://guix.gnu.org/en/manual/devel/en/html_node/Defining-Package-Variants.html). It is essentially the same as the first, but is done at the package definition level:

```Scheme
(define-module (my-tome4)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (gnu packages games))

(define-public my-tome4
  (package
    (inherit tome4)
    (source
     (origin
       (method url-fetch)
       (uri "file:///home/user/random-directory/tome4.tar.gz")
       (sha256
        (base32 "sha256checksumgoeshere"))
       (modules '((guix build utils)))))))   

```

[Here’s a tip](https://guix.gnu.org/en/manual/devel/en/html_node/Package-Modules.html) on how to use your own guile modules with guix packages.  
Also remember that the module names and file names in guile [must match each other](https://www.gnu.org/software/guile/manual/html_node/Modules-and-the-File-System.html):  
`(packages tome4) = packages/tome4.scm`  
If the names of your package and the original package are the same, you can use the `--install-from-expression=` option to specify which module the package should be taken from:

```auto
guix package -e '(@ (my-tome4) tome4)'

```

Lastly, I believe this should be done the way it is done in the obs package. There is a [search path variable](https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/video.scm#n4002) that specifies where the plugins should be loaded from, and thus the plugins can be packaged separately.

---

<div class="post-metadata">

**Author:** ![parenthetical](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/parenthetical/32/456_2.png) [@parenthetical](https://forum.systemcrafters.net/u/parenthetical)\
**Post date:** [May 10, 2024, 2:37am UTC](https://forum.systemcrafters.net/t/trying-to-apply-dlc-for-a-game-installed-by-guix-help/659/3 "2024-05-10T02:37:34Z")

</div>

Thank you so much for your detailed response! I appreciate the references to the manual. Using the package transformation option and the package defintion variant you provided both installed ToME with the DLC files and it works just like it should.
