2024-05-28 19:43:04 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-01-25 10:39:18 +02:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-04 23:33:11 +03:00
|
|
|
cp ../simple.nix ../simple.builder.sh ../config.nix "$TEST_HOME"
|
2022-01-25 10:39:18 +02:00
|
|
|
|
2024-06-04 23:33:11 +03:00
|
|
|
cd "$TEST_HOME"
|
2022-01-25 10:39:18 +02:00
|
|
|
|
|
|
|
cat <<EOF > flake.nix
|
|
|
|
{
|
|
|
|
outputs = {self}: {
|
2022-02-11 19:11:08 +02:00
|
|
|
bundlers.$system = rec {
|
|
|
|
simple = drv:
|
2022-01-28 16:56:58 +02:00
|
|
|
if drv?type && drv.type == "derivation"
|
|
|
|
then drv
|
2022-02-11 19:11:08 +02:00
|
|
|
else self.packages.$system.default;
|
|
|
|
default = simple;
|
|
|
|
};
|
|
|
|
packages.$system.default = import ./simple.nix;
|
|
|
|
apps.$system.default = {
|
|
|
|
type = "app";
|
|
|
|
program = "\${import ./simple.nix}/hello";
|
|
|
|
};
|
2022-01-25 10:39:18 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
EOF
|
2022-07-13 21:49:07 +03:00
|
|
|
|
2022-01-25 10:39:18 +02:00
|
|
|
nix build .#
|
|
|
|
nix bundle --bundler .# .#
|
2024-06-04 23:33:11 +03:00
|
|
|
nix bundle --bundler .#bundlers."$system".default .#packages."$system".default
|
|
|
|
nix bundle --bundler .#bundlers."$system".simple .#packages."$system".default
|
2022-01-28 17:17:51 +02:00
|
|
|
|
2024-06-04 23:33:11 +03:00
|
|
|
nix bundle --bundler .#bundlers."$system".default .#apps."$system".default
|
|
|
|
nix bundle --bundler .#bundlers."$system".simple .#apps."$system".default
|