PKG_SUBST(1)

πŸ“¦ in nixpkgs unstable

✨ pkg_subst(1) ✨

okay bestie, welcome to the pkg_subst manual page β€” section 1 of the General Commands Manual, if we're being official about it πŸ’…


🌸 NAME 🌸

pkg_subst β€” literally just substituting variables' values in files, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pkg_subst [-ci] [-B basedir] [-D name[=value]] [-g group] [-m mode]
          [-o owner] [file ...]

πŸ’– DESCRIPTION πŸ’–

so pkg_subst is the little icon that lives inside the ports tree and swaps out variable values β€” and it uses the exact same conventions as pkg_create(1), no cap, same rules, same energy 🫢

things like ${VAR} get replaced with the variable's value, and which value that is comes from the -D name[=value] options. iykyk ✨

the options are as follows, bestie:

  • -B basedir β€” drop a basedir where we actually know the file properties, okay? and hear me when i say: it is forbidden to copy files from elsewhere without -m mode. like, genuinely not allowed, don't do it πŸ™ˆ
  • -c β€” copy and substitute. the number of file arguments must be even β€” they pair up as src1 dest1, src2 dest2 ... and every src file gets substituted and copied into its matching dest file. cute lil couples πŸ’ž
  • -D name[=value] β€” define name to value, or to 1 if you don't hand it a value. defaults slay πŸ’…
  • -g group β€” change the group of the destination file to group
  • -i β€” ignore the changes to group or owner that failed. be unbothered, it's a lifestyle ✨
  • -m mode β€” change the mode of the destination file to mode
  • -o owner β€” change the owner of the destination file to owner

and if you pass no file arguments at all, pkg_subst acts as a filter from stdin to stdout. main character pipe energy 🧚

⚠️ okay important one: without -c, each file is backed up as file.beforesubst before the substitution happens. your og file stays safe, we love a backup arc 😭

🌈 SEE ALSO 🌈

install(1), pkg_create(1) β€” go read those too, they're giving related ✨


and that's the page, bestie πŸŽ€ this one's the Debian edition, dated June 26, 2018 β€” PKG_SUBST(1) before and after, periodt πŸ’œ

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms