Skip to content

Commit

Permalink
use version in result
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Jul 12, 2023
1 parent 42742d2 commit 99830fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions pkgs/stage1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,21 @@ do
}
end

do
local version = "0.5.11"
local src = utils.fetchTar {
url = f "http://gondor.apana.org.au/~herbert/dash/files/dash-{{version}}.tar.gz",
}
x.dash_mod = x.stdenv {
name = "dash",
version = version,
script = f [[
{{src}}/configure --prefix=$PREFIX
make -j$(nproc)
make install -j$(nproc)
]],
}
end

return x
1 change: 1 addition & 0 deletions pkgs/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ x.stdenvBuilder = function(input)
local input = input
local pkg = miq.package {
name = input.name,
version = input.version,
env = {
PATH = f "{{input.coreutils}}/bin",
},
Expand Down
6 changes: 5 additions & 1 deletion src/lua_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ impl TryFrom<PackageInput> for Unit {
type Error = LuaError;

fn try_from(value: PackageInput) -> std::result::Result<Self, Self::Error> {
let result = MiqResult::create(&value.name, &value);
let human_readable = match value.version {
None => value.name.clone(),
Some(ref version) => format!("{}-{}", &value.name, version),
};
let result = MiqResult::create(&human_readable, &value);

// Collect into Set to remove dupes
let mut deps = value
Expand Down

0 comments on commit 99830fd

Please sign in to comment.